z/OS UNIX System Services File System Interface Reference
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


BPX1VRW, BPX4VRW (v_rdwr)

z/OS UNIX System Services File System Interface Reference
SA23-2285-00

The following code writes data to a previously looked-up file whose vnode token is in VNODETOK, from the buffer provided. Control is not to be returned to the calling program until the data has been written, and authorization to write to the file is to be verified. For the callable service, see v_rdwr (BPX1VRW, BPX4VRW) — Read from and write to a file. For the data structures see BPXYOSS — Map operating system specific information and Mapping macros in z/OS UNIX System Services Programming: Assembler Callable Services Reference.
         MVC   OSSSTOR,OSS           Initialize BPXYOSS area
         MVC   FUIOSTOR,FUIO         Initialize BPXYFUIO area
         LA    R5,FUIOSTOR           Address and
         USING FUIO,R5               map BPXYFUIO area
         LA    R15,BUFFERA           Set address of buffer
         ST    R15,FUIOBUFFERADDR    to be written in FUIO
         OI    FUIOFLAGS,FUIO#WRT+FUIOSYNC+FUIOCHKACC                  +
                                     Indicate write action, write      +
                                     to medium before return,          +
                                     and check authorization
         MVC   FUIOCURSOR,=F'100'    Set offset to begin writing
         MVC   FUIOIBYTESRW,=F'80'   Max number of bytes to write
         DROP  R5
         SPACE ,
         CALL  BPX1VRW,              Read or write data to or from file+
               (VNODETOK,            Input: Vnode token for file       +
               OSSSTOR,              Input/output: BPXYOSS             +
               FUIOSTOR,             Input/output: BPXYFUIO            +
               =A(ATTR#LENGTH),      Input: BPXYATTR length            +
               ATTRSTOR,             Output: BPXYATTR                  +
               RETVAL,               Return value: 0, -1 or char count +
               RETCODE,              Return code                       +
               RSNCODE),             Reason code                       +
               VL,MF=(E,PLIST)       ----------------------------------

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014