IRI Blog Articles

Diving Deeper into Data Management

 

 

Converting & Upgrading MVS (z/OS) JCL Sort Parms

by Lisa Mangino

MVS, short for Multiple Virtual Storage, is the original operating system for IBM mainframe computers that how now become z/OS. the scripting language, or job control language (JCL), instructs the system how to run batch jobs or start subsystems.

The growth and development of technology continues to accelerate for all computers, including mainframes, and users need the fastest systems available that are capable of managing terabytes and even petabytes of data. Out of this change came the need to migrate proprietary applications, utilities, and data into modern operating systems or “big data” grids using less expensive commodity hardware.

MVS JCL sort steps will not work in these new environments. Parm conversion is necessary for those jobs to work in a Unix Shell or Windows command line for re-hosting and beyond. That is why IRI CoSort packages include free conversion tools for z/OS (MVS) and VSE sort parms, COBOL copybooks, etc.

Since its first release on Unix in 1978, CoSort has been known for its functional equivalence, equal or better sorting performance, lower operational costs, more modern metadata, and support for advanced data transformation and reporting functionality. CoSort’s included “MVS2SCL” utility successfully converts JCL sort, select, sum, etc. statements equivalent CoSort Sort Control Language (SortCL) programs that run on any Linux, Unix or Windows (LUW) platform.

Once the conversion is completed, users can leverage the full range of SortCL functionality for data transformations, data-type and file format conversion, field-level cleansing and masking, and custom report generation.

For a standalone conversion example, consider the following JCL script, called mvs1.jcl:

//JUBQ520 JOB (B09999),GI,
// MSGCLASS=S
// COND=(8,LT),
// REGION=0M
//JUBQ525 EXEC PGM=SORT
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SORTWK01 DD UNIT=DNAKS,SPACE=(CYL,(10,150))
//SORTWK02 DD UNIT=DNAKS,SPACE=(CYL,(10,150))
//SORTWK03 DD UNIT=DNAKS,SPACE=(CYL,(10,150))
//SORTWK04 DD UNIT=DNAKS,SPACE=(CYL,(10,150))
//SORTWK05 DD UNIT=DNAKS,SPACE=(CYL,(10,150))
//SORTWK06 DD UNIT=DNAKS,SPACE=(CYL,(10,150))
//SORTIN DD DSN=QV.F58700.IN.JUBQ510.JUFETATS,
// DCB=(LRECL=1504,RECFM=VB),DISP=(OLD,KEEP)
//SORTOUT DD DSN=QV.58700.IN.JUBQ520.JUFETATS,
// UNIT=DNAKS,DISP=(,CATLF,DELETE),
// SPACE=(CYL,(9,150),RLSE),
// LRECL=1504,RECFM=VB
//SYSIN DD *
SORT FIELDS=(5,180,BI, A)
INCLUDE COND=((40,15,CH,EQ,C'720141000700150'),OR,
(40,15,CH,EQ,C'720141000702091'),OR,
(40,15,CH,EQ,C'720101000942692'),OR,
(40,15,CH,EQ,C'720111000800297'))
//
/*

To automatically create the functionally equivalent SortCL job script, enter:

$ mvs2scl mvs1.jcl mvs1.scl

This produces the following SortCL job specification file in text form, mvs1.scl

/INFILE=(QV.F58700.IN.JUBQ510.JUFETATS)
     /LENGTH=1504
     /FIELD=(field_0, POSITION=5, SIZE=180, MF_COMP)
     /FIELD=(field_1, POSITION=40, SIZE=15, EBCDIC)
     /CONDITION=(cond_0, TEST=(field_1 =="720141000700159" OR
       field_1 == "720141000702091" OR
       field_1 == "720101000942692" OR
       field_1 == "720111000800297" OR
     /INCLUDE=(CONDITION=cond_0)
/KEY=(field_0, ASCENDING)
/OUTFILE=(QV.F58700.IN.JUBQ520.JUFETATS

The command line statement used to produce the same output file is:

$sortcl /spec=mvsl.scl

Another feature of CoSort’s MVS2SCL utility is its ability to preserve the original JCL and intersperse it with the required SortCL output. For example, consider the following JCL job stream, mvs2.jcl:

//JUBU740 JOB (B09999),GI,
// MSGCLASS=S
// COND=(8,LT),
// REGION=0M
//*****************************************************************
//JUBU740A EXEC PGM=RZ271300,PARM='SCAN=TIOT',
// ACCT=(B08888)
//SYSPRINT DD SYSOUT=*
//DP1001A DD DSN=C.H93010.VARH,DISP=(OLD,KEEP),UNIT=SYSDA
//*---------------------------------------------------------------*
//IF JUBU740A.RC=0 ! JUBU740A.RUN=FALSE THEN
//*****************************************************************
//* SORTING SECTION *
//*****************************************************************
//JUBU740B EXEC PGM=SORT,
// ACCT=(B09999)
//SYSOUT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//SORTWK01 DD UNIT=SYSDA.SPACE=(CYL,5)
//SORTWK02 DD UNIT=SYSDA,SPACE=(CYL,5)
//SORTIN DD DSN=K.H93010.VARH(0), /*FROM JUBU730
// DISP=(OLD,KEEP)
//SORTOUT DD DSN=C.H93010.VARH,DISP=(OLD,KEEP)
//SYSIN DD *
SORT FIELDS=(1,19,A),FORMAT=BI
//*
//*---------------------------

By running $mvs2scl  mvs2.jcl mvs.scl, the mvs2.scl result contains:

//JUBU740 JOB (B09999),GI,
// MSGCLASS=S
// COND=(8,LT),
// REGION=0M
//*****************************************************************
//JUBU740A EXEC PGM=RZ271300,PARM='SCAN=TIOT',
// ACCT=(B08888)
//SYSPRINT DD SYSOUT=*
//DP1001A DD DSN=C.H93010.VARH,DISP=(OLD,KEEP),UNIT=SYSDA
//*---------------------------------------------------------------*
//IF JUBU740A.RC=0 ! JUBU740A.RUN=FALSE THEN
//*****************************************************************
//* SORTING SECTION *
//*****************************************************************
//JUBU740B EXEC PGM=SORT,
// ACCT=(B09999)
//SYSOUT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//SORTWK01 DD UNIT=SYSDA.SPACE=(CYL,5)
//SORTWK02 DD UNIT=SYSDA,SPACE=(CYL,5)
//SORTIN DD DSN=K.H93010.VARH(0), /*FROM JUBU730
// DISP=(OLD,KEEP)
//SORTOUT DD DSN=C.H93010.VARH,DISP=(OLD,KEEP)
//SYSIN DD *
/INFILE=(K.H93010.VARH)
/FIELD=(field_0, POSITION=1, SIZE=19, MF_COMP)
/KEY=(field_0, ASCENDING)
/OUTFILE=(C.H93010.VARH)
SORT FIELDS=(1,19,A),FORMAT=BI
//*
//*---------------------------------------------------------------*
//ENDIF

The free GUI for CoSort, IRI Workbench (built on Eclipse), makes it even easier to convert JCL sort parms into SortCL job scripts. Below are some sample screenshots from the JCL Sort Job import wizard that illustrate this process.

From the file menu, select import to open the import wizard. Under source format, select MVS JCL sorts, and the IRI Workbench will create the SortCL job script(s) against each one found.

 

 

Note that in the resulting SortCL script file ( mvs2.jcl.scl), each /FIELD statement is given a default name. IRI recommends that you re-name the fields with meaningful, symbolic references that will help you in expanding, sharing, or using these layouts in new applications that may transform, convert, report, or mask sensitive fields in the data being processed.

Indeed, beyond rehosting, there lies a wide range of available data profiling, integration (ETL), migration, governance, and analytic functionality powered by SortCL that expands your operational possibilities going forward. Consider all the different use cases for SortCL, and thus its core role in the IRI product line; e.g., being the default ETL, data quality, masking, and BI engine in IRI’s big data management platform, Voracity.

For more information, see www.iri.com/solutions/sort-replacements/jcl-sort or email: cosort@iri.com.

Print Friendly

{ 0 comments… add one now }

Leave a Comment

Previous post:

Next post: