Ending The Command Procedure; A Compiler Command Procedure - IBM System 360 User Manual

Operating system: time sharing option terminal
Hide thumbs Also See for System 360:
Table of Contents

Advertisement

If instead of ending proc4 when the test is true, you want to execute
another procedure that resides in the JONES.PROC5.CLIST data set, enter:
when sysrc(eq 8) execproc5
If the test is true, procS will replace the procedure that requested its
execution.
WhenprocS is done, nO other commands in proc4 will be
executed.
Now the system will be ready for a command from the terminal
or will return to the command procedure that invoked proc4.
If instead
of executing a procedure, you want to enter a LIST command, enter:
when sysrc(eq 8) list pgm.list snum
ENDING THE COMMAND PROCEDURE
You may write an END statement after the last line of the corrmand
procedure.
When the system encounters an END statement in a command
procedure it sends a READY message to the terminal so you can enter
another command.
A COMPILER COMMAND PROCEDURE
Figure 14.2 shows a command procedure that could be used to invoke the
PL/I (F) compiler.
'Ibis procedure would be created with the EDIT
command as a command list (CLIST) data set, under an appropriate member
name, such as PLIF.
r----------------------------------------------------------------------,
11 PROC 1 NAME
I
12 ALLOCATE DATASETCiNAME •• PLI} FILE(SYSIN)
I
13 ALLOCATE DATASET ( &NAME •• LIST) FILE CSYS-PRINT} BLOCK (125)
J
14
SPACEC300,100)
I
IS_ALLOCA-~E--DATASETC
iNAME •• OBJ) FILE CSYSLIN) BLOCK
(eO)
SPACEC2S0, 100)
I
16 ALLOCATE FILE(SYSUT1) BLOCR(1024) SPACEC60,60)
I
17 ALLOCATE FILE (SYSU'!'3) BLOC K (80) SPACE C2S0 ,100)
I
18 CALL ·SYS1.LINKLIBCIEMAA)' 'LIST,ATR,XREF,STMl',MACRO'
I
19
FREE FILECSYSUT1,SYSUT3,SYSIN,SYSPRINT)
I
L ______________________________________________________________________
J
Figure 14.2.
A Command Procedure to Invoke the PL/I CF) Compiler
At 1 in the sample procedure is a PROC statement, defining a single
positional parameter to be supplied by the user when
~he
procedure is
invoked, in this case, the name of his program.
Whatever value the us er
specifies when calling the procedure will be filled into the following
commands wherever "&NAME" appears.
Records 2 through 7 perform the data set allocations required by the
PL/I compiler.
Record 2 allocates the input data set containing the
source program.
Although this data set is probably already allocated,
since the user has most likely just created it with EDIT, this ALLOCATE
85.1
TSO Terminal User's Guide
(Release 21.7)

Advertisement

Table of Contents
loading

Table of Contents