IBM OS/390 User Manual

Page of 673
4.5.2 Sample  MVS JCL
The task surrounding the conversion of JCL is more than mapping between VSE
JCL using this syntax and MVS JCL using that syntax. At the base of these two
JCLs are different philosophies. A parameter by parameter comparison is
insufficient. Comparing the VSE DLBL/EXTENT to a DD Statement is only part of
the story. These examples are meant to give the read only a 
flavor
″ 
for what
changes have to take place. It is necessary to look at the two systems at a
higher level as well.
//MYJOB JOB ACCT#,
REPORT BY PLANT
′ ,
CLASS=F,REGION=4M
//*
//STEP1 EXEC PGM=PROGRAM1
//SYSLST DD SYSOUT=W COPIES=3
//TAPEIN DD DSN=INPUT.TAPE,DISP=OLD,
// UNIT=TAPE,VOL=SER=REEL22
//DISKOUT DD DSN=WORK.DISK,DISP=(,CATLG),
// UNIT=SYSDA,SPACE=(TRK,(500,100),RLSE)
//*
//STEP2 EXEC PGM=SORT,COND=(0,NE)
//SORTIN DD DSN=WORK.DISK,DISP=(OLD,DELETE)
//SORTOUT DD DSN=WORK.DISK2,DISP=(,CATLG),
// UNIT=SYSDA,SPACE=(TRK,(500,100),RLSE)
//SYSOUT DD SYSOUT=*
//SYSIN DD *
SORT FIELDS=(1,32,CH,A)
RECORD TYPE=F,LENGTH=87
/*
//SORTWK01 DD UNIT=SYSDA,SPACE=(TRK,(500,100))
//SORTWK02 DD UNIT=SYSDA,SPACE=(TRK,(500,100))
//*
//STEP3 EXEC PGM=PROGRAM2,COND=(O,NE)
//SYSLST DD SYSOUT=F,FCB=FK33
//DISKIN DD DSN=WORK.DISK2,DISP=(OLD,DELETE)
//DEST01 DD SYSOUT=A,DEST=KCJONES
//DEST02 DD SYSOUT=A,DEST=HERBERT
//SYSIN DD *
01 ENDICOTT
02 BOEBLINGEN
 1. Conditional OPENs
An example of the higher level differences between OS/390 and VSE is in the
area of allocation. In OS/390, allocation is at the beginning of the step. VSE
does not open a file until an OPEN is issued. This is a key concept and one
that requires more than a term by term comparison. Frequently in VSE there
are applications that open a file for output once a week on Friday. On other
days this VSE file won
t be opened. In OS/390, a data set will be created
every day whether it is used or not. These high level type differences must
also be addressed and as early in the migration as possible.
 2. In-stream DD Card
There are three or four techniques to handle these situations.
One method is to convert the imbedded in-stream DD CARD by having the
JCL Batch of DD Names that somehow tie up the control cards and have
PROGRAM2 call some subroutine that would change the DD Name.
Chapter 4. Job Control Language (JCL) Differences and Considerations
93