PART execs: database access examples

This set of execs accesses the PART database shipped with IMS. These execs demonstrate fixed-record database reading, SSAs, and many REXX functions. The PART database execs (PARTNUM, PARTNAME, and DFSSAM01) are also described.

The PARTNUM exec is used to show part numbers that begin with a number equal to or greater than the number you specify. An example output screen is shown in the figure below.

To list part numbers beginning with the number 300 or greater, enter the command:
PARTNUM 300
All part numbers that begin with a 300 or larger numbers are listed. The listing is shown in the figure below.
Figure 1. Example output of PARTNUM exec
 IMS Parts DATABASE Transaction
 System Date: 02/16/92    Time: 23:28:41
 
 Request: Display 5 Parts with Part_Number >= 300
  1 Part=3003802          Desc=CHASSIS
  2 Part=3003806          Desc=SWITCH
  3 Part=3007228          Desc=HOUSING
  4 Part=3008027          Desc=CARD FRONT
  5 Part=3009228          Desc=CAPACITOR
 
 EXEC PARTNUM ended with RC= 0
 

PARTNAME is used to show part names that begin with a specific string of characters.

To list part names beginning with TRAN, enter the command:
PARTNAME TRAN
All part names that begin with TRAN are listed on the screen. The screen is shown in the following figure.
Figure 2. Example output of PARTNAME exec
 IMS Parts DATABASE Transaction
 System Date: 02/16/92    Time: 23:30:09
 
 Request: Display 5 Parts with Part Name like TRAN
  1 Part=250239           Desc=TRANSISTOR
  2 Part=7736847P001      Desc=TRANSFORMER
  3 Part=975105-001       Desc=TRANSFORMER
  4 Part=989036-001       Desc=TRANSFORMER
 End of DataBase reached before 5 records shown.
 
 EXEC PARTNAME ended with RC= 0
 

The DFSSAM01 exec is used to load the parts database. This exec is executed in batch, is part of the IVP, and provides an example of EXECIO usage in an exec.

Related Reading: For details, see IMS Version 15.2 Installation.