SekChek for AS/400: Running a Scan (automated method)

Overview of the process

The Scan process involves:

  • Creating the Scan software (SEKASEXT)
  • Creating a temporary library to contain SEKASEXT on the AS/400 host
  • Transferring file SEKASEXT to the AS/400 host
  • Compiling SEKASEXT in the temporary library
  • Executing the Scan software
  • Transferring the Scan files created by SEKASEXT from the AS/400 host to a PC

Create the SekChek for OS/400 Scan software

From the SekChek Client software on your PC: select the AS/400 tab; click Create to create the Scan software.

Creating the AS/400 Scan software


Important  Use the QSECOFR profile for the following operations.
The user profile used will be locked while the DSPPGMADP command, within the CL script, is running. If this profile owns a lot of objects, the profile could be locked for an extended period of time.


1. Create a temporary library on the AS/400 host system

From the OS/400 command line enter: CRTLIB LIB(SEKCHEK)

  • where SEKCHEK = the desired library name

2. Define the source file in the temporary library

From the OS/400 command line enter: CRTSRCPF FILE(SEKCHEK/SEKASSRC) MBR(SEKASEXT)

  • SEKCHEK = the library to contain the Scan source
  • SEKASSRC = the name of the source file
  • SEKASEXT = the member name in the source file

Optional. To verify that the library, file and member have been created successfully enter:

  • DSPPFM FILE(SEKCHEK/SEKASSRC) MBR(SEKASEXT)
  • An error message will be displayed if any of the objects do not exist.

3. Transfer the Scan software to the AS/400 host

Copy file SEKASEXT to file SEKASSRC (member SEKASEXT) in library SEKCHEK.

Basic ftp commands using a machine with sample IP address 123.456.78.90:

  • ftp 123.456.78.90 (establish an ftp connection with target machine 123.456.78.90)

  • put local_filename sekchek/sekassrc.sekasext (replace
  • (copy local_filename from the default directory on the local machine to the default directory on the remote machine with replace existing files set to on)

  • bye or quit (to exit ftp)

More information: A sample ftp session


4. Compile the Scan software (SEKASPGM)

From the AS/400 command line enter (all on one line):

  • CRTCLPGM PGM(SEKCHEK/SEKASPGM) SRCFILE(SEKCHEK/SEKASSRC) SRCMBR(SEKASEXT) USRPRF(*OWNER)

  • SEKCHEK = the name of the library
  • SEKASPGM = the name of the executable
  • SEKASSRC = the source file for the Scan software (CL)
  • SEKASEXT = the Scan software (CL) source member

5. Execute the Scan software (SEKASPGM)

To run the Scan software interactively enter: CALL PGM(SEKCHEK/SEKASPGM)

  • SEKCHEK = the library name
  • SEKASPGM = the name of the Scan program

Files PROFBAS, SYSVALS, OBJAUT, PGMADP, ANZDFTPWD, SRVTBLE & SEKLOG will be written to library SEKCHEK.

Note that file SRVTBLE, which contains details of the services table, will not be created if the Scan software is executed in batch mode (see below).

This is because the underlying command is not supported by OS/400 in this mode, so you will receive an error message (CPD0031 "Command WRKSRVTBLE not allowed in this setting") at execution time. All other files will be created OK. In general, we recommend SekChek is run interactively, rather than in batch mode.

To run the Scan software in batch mode enter:

  • SBMJOB CMD(CALL PGM(SEKCHEK/SEKASPGM)) JOB(SEKCHEK)

  • SEKCHEK = the library name
  • SEKASPGM = the name of the Scan program
  • SEKCHEK = the OS/400 Job name

6. Download SekChek’s Scan files to a PC

Download the 7 Scan files (PROFBAS, SYSVALS, ANZDFTPWD, PGMADP, OBJAUT, SRVTBLE and SEKLOG) to a PC.

Important  Specify binary in your copy utility or ftp software when downloading the PROFBAS file to a PC.
For all other files, specify fixed-length records and ASCII/text format.

Basic ftp commands using a machine with sample IP address 123.456.78.90:

  • ftp 123.456.78.90 (establish an ftp connection with machine 123.456.78.90)

  • binary (change the ftp transfer mode to binary)

  • get sekchek/profbas local_filename
  • (copy the profbas file from the remote machine to the default directory on the local machine. The local_filename in this case would be Profbas.txt in a specified directory on the PC)

  • bye or quit (to exit ftp)

More information: A sample ftp session


7. Delete the temporary files from the AS/400 host

From the AS/400 command line enter:

  • RMVLIBLE SEKCHEK

  • DLTLIB LIB(SEKCHEK)

This will delete library SEKCHEK and its contents. I.e. all files/objects created during the Scan process.


8. Encrypt the Scan files

After the Scan process has finished:

  • Transfer the Scan files to a PC that has the SekChek Client software installed
  • Use SekChek Client to encrypt the files with SekChek’s public key

Please contact us for assistance if you encounter difficulties with the process.




More Information...

SekChek for..

Popular Downloads..

Popular Links..