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


BPX1VMK, BPX4VMK (v_mkdir)

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

The following code creates a new and empty directory named newprots in a previously looked-up directory whose vnode token is in DIRVNODETOK with user read-execute, group write, other read-execute permissions. For the callable service, see v_mkdir (BPX1VMK, BPX4VMK) — Create a directory. 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(8),=CL8'newprots'
         MVC   BUFLENA,=F'8'
         MVC   OSSSTOR,OSS           Initialize BPXYOSS area
         MVC   ATTRSTOR,ATTR         Initialize BPXYATTR area
         XC    S_MODE,S_MODE         Clear mode
         MVI   S_TYPE,FT_DIR         Set directory file type
         MVI   S_MODE2,S_IRUSR       Read-execute/write/read-execute
         MVI   S_MODE3,S_IXUSR+S_IWGRP+S_IROTH+S_IXOTH
         LA    R5,ATTRSTOR           Address and
         USING ATTR,R5               map BPXYATTR area
         MVC   ATTRMODE,S_MODE       Move mode data to attribute       +
                                     structure
         DROP  R5
         SPACE ,
         CALL  BPX1VMK,              Make a directory                  +
               (DIRVNODETOK,         Input: Directory vnode token      +
               OSSSTOR,              Input/output: BPXYOSS             +
               BUFLENA,              Input: New directory name length  +
               BUFFERA,              Input: New directory name         +
               =A(ATTR#LENGTH),      Input: BPXYATTR length            +
               ATTRSTOR,             Input/output: BPXYATTR            +
               DIRVNODETOK2,         Output: New directory Vnode token +
               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