John Corbin Beginner
Joined: 23 Jan 2004 Posts: 38 Topics: 21
|
Posted: Fri Jan 05, 2007 2:50 pm Post subject: |
|
|
My solution.. note that the source dataset was on tape. The source dataset was DB2 unload of a database table. Each record has the DB2 table ID as part of the record along with the VB blocking factor ( 7 chars in all at the start of each record ).
The main JCL UIW1EHAA
Code: |
//UIW1EHAA JOB 85500,'UIW1EHAA',
// CLASS=T,
// MSGCLASS=H,USER=JCORBIN
/*JOBPARM ROOM=FD02,L=300,TIME=1
//*
//*--------------------------------------------------------------------*
//* UIW1EHAA - REFORMAT RPS DATABASE TABLE INFORMATION
//*--------------------------------------------------------------------*
//*
//*
//PROCS JCLLIB ORDER=(SYSP.HOST.UA.JCLLIB,
// IW.JCORBIN.ADW.PROCLIB,
// IW.UIW1.PROCLIB,
// IW.JCORBIN.ADW.CNTLCARD,
// CNTRL.HOLD.JCL,
// PROD0.SYSALL.GLOBAL.PROCLIB)
//JOBLIB INCLUDE MEMBER=SYJOB00 * JOBLIB
// INCLUDE MEMBER=SYNDVRB0 * ENDEVOR
// INCLUDE MEMBER=AIW1C0C * ADW RUN INDICATORS
//*
// EXEC UIW1EH10
//*
//*------------------------END OF JOB UIW1EHAA -------------------------
//*
[u][b]Calls PROC UIW1EH10[/b][/u]
//*---------------- SORTOUT FILE --------------------------------------*
//*
//SORTOUT DD DSN=IW.UIW1EH.EXTRACT.TSIC,
// DISP=(NEW,CATLG,DELETE),
// SPACE=(CYL,(500,50),RLSE),
// UNIT=(SYSDA,10)
//*
//*---------------- UNLOADED FILE LAYOUT -----------------------------
//*
//SYSIN DD DISP=SHR,DSN=IW.JCORBIN.ADW.CNTLCARD(UIW1EHXC)
//*
//*------------------------END OF PROC UIW1EH10-------------------------
//*
|
The PROC references a CNTCARD UIW1EHXC
The original file length was 205 chars long. to convert to FB format I had to drop the first 7 chars of each record.
Code: |
SORT FIELDS=COPY,DYNALLOC=SYSDA
OUTFIL OUTREC=(7,198),CONVERT
|
In case you are wondering why it was done this way ( I agree it is rather convoluted ), the group I am in supports a production environment that has me doing plenty of on call work. a lot of the JCL we support is written using PROCS and I had no real knowledge of it.
A good learning experience. |
|