SekChek for AS/400: Scan Instructions (automated method)

SekChek

Scan Instructions (Automated Method)


Prerequisites

You should already have created a copy of the Scan software

Outline of this Step


**IMPORTANT**
To ensure correct results 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

Refer to IBM Technical APAR#: SA54337 for further information. We recommend that the SekChek for AS400 CL script is run during off-peak hours.



1. Allocate Temporary Library

From the AS/400 command line enter:

CRTLIB LIB(SEKCHEK)

SEKCHEK= Desired Output Library Name


2. Allocate Source File in Temporary Library

From the AS/400 command line enter:

CRTSRCPF FILE(SEKCHEK/SEKASSRC) MBR(SEKASEXT)

SEKCHEK= Library to contain the Scan Source
SEKASSRC= Source File Name
SEKASEXT= Member in Source File

(Optional) To verify that the Library, File and Member have been created successfully, from the AS/400 command line enter:

DSPPFM FILE(SEKCHEK/SEKASSRC) MBR(SEKASEXT)

If either the Library, File or Member objects do not exist on the AS/400 system, an error will be displayed with details of which object does not exist.

Possible Errors:

  • Library <LibraryName> Not Found
  • File <FileName> in Library Not Found
  • File <FileName> in Library <LibraryName> with Member <MemberName> Not Found 

3. Copy the Scan Software Source to the AS/400

Copy file SEKASEXT from the Scan Software diskette/PC to file SEKASSRC member SEKASEXT in Library SEKCHEK.


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

ftp 193.241.02.85 (establish an ftp connection with machine 193.241.02.85)

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) (exit ftp)

More information: A sample ftp session


4. Compile the Scan Software (CL) Source

From the AS/400 command line enter:

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

SEKCHEK= Library Name
SEKASPGM= Executable Program Name
SEKASSRC= Scan Software (CL) Source File
SEKASEXT= Scan Software (CL) Source Member


5. Execute the Scan Software (SEKASPGM)

To run the Scan software interactively, enter the following command from the AS/400 command line:

CALL PGM(SEKCHEK/SEKASPGM)

SEKCHEK= Library Name
SEKASPGM= Scan Program Name

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 the following command from the AS/400 command line:

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

SEKCHEK= Library Name
SEKASPGM= Scan Program Name
SEKCHEK= Job Name

6. Download the Scan Files to a PC

Download 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 193.241.02.85:

ftp 193.241.02.85 (establish an ftp connection with machine 193.241.02.85)

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) (exit ftp)

More information: A sample ftp session


7. Delete Temporary Files Created on AS/400

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).


Should you encounter difficulties with the process, call us with details of the problem and we will guide you through the process.


Next Step…

Encrypt the Scan Files on your PC