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


BPX1VSY, BPX4VSY (v_symlink)

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

The following code creates an external symbolic link to data set MY.DATASET, the "pathname", for link name mydataset, the "link name", which is contained in a previously looked-up directory whose vnode token is in DIRVNODETOK. For the callable service, see v_symlink (BPX1VSY, BPX4VSY) — Create a symbolic link. For the data structures, see BPXYATTR — Map file attributes for v_ system calls, BPXYOSS — Map operating system specific information, and Mapping macros in z/OS UNIX System Services Programming: Assembler Callable Services Reference.
         MVC   BUFFERA(09),=CL09'mydataset'  Name of link
         MVC   BUFLENA,=F'09'
         MVC   BUFFERB(10),=CL10'MY.DATASET' Contents of link
         MVC   BUFLENB,=F'10'
         MVC   OSSSTOR,OSS           Initialize BPXYOSS area
         MVC   ATTRSTOR,ATTR         Initialize BPXYATTR area
         LA    R5,ATTRSTOR           Address and
         USING ATTR,R5               map BPXYATTR area
         OI    ATTRVISIBLE,ATTREXTLINK                                 +
                                     Flag as external link
         DROP  R5
         SPACE ,
         CALL  BPX1VSY,              Create a symbolic link            +
               (DIRVNODETOK,         Input: Directory vnode token      +
               OSSSTOR,              Input/output: BPXYOSS             +
               BUFLENA,              Input: Link name length           +
               BUFFERA,              Input: Link name                  +
               BUFLENB,              Input: Pathname length            +
               BUFFERB,              Input: Path name                  +
               =A(ATTR#LENGTH),      Input: BPXYATTR length            +
               ATTRSTOR,             Input/output: BPXYATTR            +
               RETVAL,               Return value: 0 or -1             +
               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