The following code creates a new and empty directory pathname
of
/usr/newprots/ with user read-execute, group write,
other read-execute permissions. For the callable service, see
mkdir (BPX1MKD, BPX4MKD) — Make a directory. For the data structure, see
BPXYFTYP — File type definitions and
BPXYMODE — Map the mode constants of the file services.
AMODE 64 callers use
BPX4MKD (mkdir) example.
MVC BUFFERA(14),=CL14'/usr/newprots/'
MVC BUFLENA,=F'14'
XC S_MODE,S_MODE
MVI S_MODE2,S_IRUSR Read search write read search
MVI S_MODE3,S_IXUSR+S_IWGRP+S_IROTH+S_IXOTH
SPACE ,
CALL BPX1MKD, Make a directory +
(BUFLENA, Input: Pathname length +
BUFFERA, Input: Pathname +
S_MODE, Input: BPXYMODE and BPXYFTYP +
RETVAL, Return value: 0 or -1 +
RETCODE, Return code +
RSNCODE), Reason code +
VL,MF=(E,PLIST) ----------------------------------