When trying to setup HFSSEC security per Broadcom SAF HFS ADD and PERMIT Generation Utility :
Step 1 in the File Protection Procedure section has the following:
1. Run the OMVS “ls -lRA” command in a batch TMP. Direct the output to a standard DASD file. This file must be allocated with RECFM=VB.
Issue the ls command from the OMVS shell, directing the output to a HFS file. The options -lRA must be specified (the character following the dash is a lower case letter ‘L’, not the number one). The file can then be copied into a MVS data set using the OGET command.
When issuing “ls -lRA” through TSO OMVS, it seems to list all the files on the system. When doing “ls -lRA” through JCL, the following error occurs:
********************************* TOP OF DATA ******************
READY
LS -LRA / / xxxx / yyy/ zzzzzz
IKJ56500I COMMAND LS NOT FOUND
READY
READY
IKJ56600I UNRECOVERABLE COMMAND SYSTEM ERROR
******************************** BOTTOM OF DATA ****************
The IKJ56500I message is occurring because ‘ls’ is not a TSO command, and therefore, cannot be found by TSO. Without the oshell in front of it, the IKJEFT01 will always occur because IKJEFT01 is the way to get into TSO from batch, not Unix System Services. The following is sample jcl for this.
//STEP1 EXEC PGM=IKJEFT01
//SYSPRINT DD SYSOUT=*
//SYSPROC DD DISP=SHR,DSN=SYS1.SBPXEXEC
//SYSTSPRT DD SYSOUT=*
//SYSTERM DD DUMMY
//SYSTSIN DD *
oshell ls -lRA / >>directory_information_file
/*
oshell is found in the SYS1.SBPXEXEC library, so a SYSPROC DD statement pointing to this library is needed in the JCL.