//JCD2DSN JOB 'JOB INFORMATION',MSGLEVEL=(1,1), // MSGCLASS=H,CLASS=A,NOTIFY=&SYSUID //******************************************************************* //* This is sample JCL which can be used to receive an encrypted * //* dataset on a tape and perform decryption using the Encryption * //* Facility for z/OS JAVA client. The resulting decrypted data is * //* placed into a z/OS dataset. * //* * //* Overview of job steps * //* - STEP1 - this will use IEBGENER to copy an encrypted dataset * //* from a tape and place it into a file within the USS * //* file system. * //* - STEP2 - this will use the USS file created by STEP1 and * //* invoke BPXBATCH to run a shell script named * //* javadecrypt_pw.sh to decrypt the data into another * //* USS file within a file system. * //* - STEP3 - this will use IEBGENER to copy the decrypted file * //* from the USS file system and place it into an z/OS * //* dataset. * //* * //* File, dataset and JOB considerations: * //* - The originating encrypted dataset is assumed to be * //* of Fixed Block (FB) Record Format (RECFM). * //* * //* - All steps within this job specify the REGION= parameter. * //* This is critical to STEP2 to ensure that JAVA has * //* sufficient memory to execute and decrypt the file. * //* * //* - The user must ensure that there is sufficient space * //* available within the USS file system to contain the * //* encrypted file (which came from tape) and the decrypted * //* file (which was the output of the EF JAVA decryption client).* //* * //* - The customer's client (receiver of the encrypted data) must * //* know the dataset attributes (BLKSIZE,RECFM,LRECL) of the * //* original (clear) source dataset. This information is * //* required for STEP3 of this job. It is specified on STEP3, * //* SYSUT1 DD in this sample. * //* * //* - The customer's client (receiver of the encrypted data) must * //* also know the size of the original (clear) source dataset. * //* This information is required for STEP3 of this job. It is * //* specified on STEP3, SYSUT2 DD for the SPACE value. * //* * //* Note: USS refers to Unix System Services * //* * //******************************************************************* //******************************************************************* //* STEP1 - This jobstep will copy an encrypted file from a tape * //* dataset to an HFS file within Unix System Services. The HFS * //* is automatically created via the OCREAT specified on the * //* PATHOPTS keyword. The PATHDISP keyword will keep the file * //* active across to the next step. * //* Refer to the Unix System Services User's Guide for additional * //* explanation on PATHOPTS, PATHMODE and PATHDISP. * //******************************************************************* //STEP1 EXEC PGM=IEBGENER,REGION=6M //SYSUT1 DD UNIT=3590-1,DSN=HLQ.ENCRYPTED.TAPE.DATASET, // DISP=(SHR),VOL=SER=ABCDEF //SYSUT2 DD PATH='/filesys/input.encrypt.file', // PATHOPTS=(OWRONLY,OCREAT), // PATHMODE=SIRWXU, // PATHDISP=KEEP //SYSPRINT DD SYSOUT=* //SYSIN DD DUMMY //* //******************************************************************* //* STEP2 - This jobstep will use BPXBATCH to invoke a USS shell * //* script which invokes the EF JAVA decryption client. The JAVA * //* decryption client uses STDIN as input to specify the USS file * //* containing the encrypted data. The JAVA decryption client * //* uses STDOUT as the output USS file into which decrypted data * //* will be placed. * //* * //* The shell script is named javadecrypt_pw.sh and the names * //* of the files specified in STDIN and STDOUT DDs must match * //* the input and output file specifications in the shell script. * //* The PARM specified on BPXBATCH assumes that the shell script * //* resides in the USS filesystem in a path specified by /path. * //* * //* STDERR specifies a USS file into which error messages from * //* the JAVA decryption client will be placed. * //* * //* Repeating from the comments above, REGION=0M is critical * //* on STEP2 to ensure that JAVA has sufficient storage to decrypt * //* the input file. * //******************************************************************* //STEP2 EXEC PGM=BPXBATCH,REGION=0M, // PARM='SH /path/javadecrypt_pw.sh' //STDIN DD PATH='/filesys/input.encrypt.file', // PATHOPTS=(ORDONLY), // PATHMODE=SIRWXU, // PATHDISP=KEEP //STDOUT DD PATH='/filesys/output.decrypt.file', // PATHOPTS=(OWRONLY,OCREAT), // PATHMODE=SIRWXU, // PATHDISP=KEEP //STDERR DD PATH='/path/stderr.log', // PATHOPTS=(OWRONLY,OCREAT,OTRUNC),PATHMODE=SIRWXU //******************************************************************* //* STEP3 - This jobstep will copy a decrypted file from a USS * //* file within the file system to a z/OS dataset via IEBGENER. * //* The BLKSIZE, LRECL, and RECFM on SYSUT1 will drive the * //* attributes that will be used on SYSUT2 when it is created. * //* * //* The space required to handle the decrypted output * //* in the z/OS dataset must be consistent with the original * //* (clear) source dataset that came from the originator partner. * //* In this sample, the dataset required 300 cylinders on a 3390. * //* * //******************************************************************* //STEP3 EXEC PGM=IEBGENER,REGION=6M //SYSUT1 DD PATH='/filesys/output.decrypt.file', // BLKSIZE=6144,LRECL=1024,RECFM=FB, // PATHOPTS=(ORDONLY), // PATHMODE=SIRWXU, // PATHDISP=KEEP //* //SYSUT2 DD DSN=HLQ.DECRYPT.OUTPUT, // DISP=(NEW,CATLG), // SPACE=(CYL,(2,1)),UNIT=SYSDA //SYSPRINT DD SYSOUT=* //SYSIN DD DUMMY