IBM OS/390 User Manual

Page of 673
Instream data will always follow an EXEC statement, and it is the responsibility of
the executing program which is reading the instream data to recognize the end
of that data. By default, the instream data delimiter is the 
″/
*
″ 
statement,
although an application program can choose its own delimiter. This allows
programs other than JCL to read and process JCL statements, for example,
when the librarian program stores JCL as library members or procedures.
This same capability was often used to control the flow of jobs -- for example, a
program could decide to skip the next job step, and then just read and ignore (or
swallow
″) 
the JCL statements for that step. With the advent of VSE conditional
JCL in the mid-1980s, the use of this technique has greatly declined, but its use
is found in perhaps 25% of shops converting from VSE to OS/390.
In MVS systems, in contrast, JCL statements and instream data are separated
during the JCL Conversion processing, so that user programs cannot 
see
″ 
JCL
statements, and JCL processing is simplified.
Instream data sets in the OS/390 environment can be read in any sequence, and
can be read multiple times. Thus, an OS/390 job that reads the same instream
input at three different times could simply open and process that data set three
times.
4.3.1.1 Multiple Instream Data Set Input
A VSE job step that reads one input card file under two different program DTFs
requires that the input statements be properly sequenced, whereas in OS/390,
the two input files could appear as two separate instream files.
VSE Example
OS/390 Example
// EXEC MYPROG...
//FILE1 DD *
FILE 1 CARD 1
FILE 1 CARD 1
FILE 1 CARD 2
FILE 1 CARD 2
FILE 2 CARD 1
FILE 1 CARD 3
FILE 1 CARD 3
FILE 1 CARD 4
FILE 1 CARD 4
FILE 1 CARD 5
FILE 2 CARD 2
FILE 1 CARD 6
FILE 1 CARD 5
/*
FILE 1 CARD 6
//FILE2 DD *
FILE 2 CARD 3
FILE 2 CARD 1
/*
FILE 2 CARD 2
FILE 2 CARD 3
/*
// EXEC PGM=MYPROG...
For this processing to work correctly in VSE, it is clearly dependent upon the
program logic and the setup of the instream data. This would be much simpler in
the OS/390 environment. If the MVS example attempts to use just one instream
data set, with two program files being read, each program file will find the same
input data. That is, the first read (from file 1) would read the first record, and the
second read (from file 2) would also read the same first record, as it is the first
read for that file.
74
VSE to OS/390 Migration Workbook