Using the phone application under batch
The sample batch phone applications are provided in Fortran (DSN8BF3), COBOL (DSN8BC3), C (DSN8BD3), and PL/I (DSN8BP3).
Procedure
To update or list an employee phone number:
| Column | Description |
|---|---|
| 1 | ACTION—U for update, L for list |
| 2 | Employee last name |
| 17 | Employee first name |
| 29 | Employee number |
| 35 | New phone number |
The ACTION code in this card image indicates whether an employee number is to be updated (U) or listed (L). When updating an employee phone number, only the employee number and the new phone number are specified in the data set. When listing phone numbers, the last name must be specified. Specifying the first name is optional. The * and % can be used with the ACTION code just as they are used with the panels.
Example
The following figure shows an example of an update data set and a list data set. Each time a number is listed or updated, a new data set is created containing a card image like the one in the following figure. The first card in the data set shows the phone number of employee number 000140 being updated (U) to 6767. The second card shows a list (L) for Heather Nicholls. The last card shows a list (L) of all employees whose first names begin with the letters MAR. The example shows the letters MAR followed by a % in the first name column to indicate that only those employees whose first names begin with MAR are to be listed.
The data set that contains the JCL for processing information is supplied with Db2 and is contained in DSNTEJ2P, which is part of prefix.SDSNSAMP. The figure below shows the data set that contains the JCL with the card image data sets embedded.
//PH02PS05 EXEC PGM=IKJEFT01,DYNAMNBR=20
//SYSTSPRT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//REPORT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//CARDIN DD *
U 0001406767
LNICHOLLS HEATHER
L MAR%
//SYSTSIN DD *
DSN SYSTEM(DSN)
RUN PROGRAM(DSN8BP3) PLAN(DSN8BP13) LIB('prefix.RUNLIB.LOAD')
END
The complete data set can be submitted to the system either through a card reader or from a terminal through TSO. The figure below contains an example of the batch output.
---------------------------- TELEPHONE DIRECTORY -----------------------
LAST NAME FIRST NAME INITIAL PHONE EMPLOYEE WORK WORK
NUMBER NUMBER DEPT DEPT NAME
QUINTANA DOLORES M 6767 000130 C01 INFORMATION CENTER
NICHOLLS HEATHER A 1793 000140 C01 INFORMATION CENTER
SCOUTTEN MARILYN S 1682 000180 D11 MANUFACTURING SYSTEMS
PEREZ MARIA L 9001 000270 D21 ADMINISTRATIVE SYSTEMS