View previous topic :: View next topic
Author
Message
rajantsr New User Joined: 31 Jan 2007Posts: 21 Location: Chennai
Hi...
I dont know whether this is strange problem or a simple one. But it is killing me inside.
I have to create a GENERIC sysin card for different input files (with different lrecl)
Below is the SYSIN CARD i am using for single file.
Code:
//TOOLIN DD *
SELECT FROM(IN1) TO(F1) ON(1,11,CH) FIRST
SELECT FROM(IN2) TO(F1) ON(1,11,CH) FIRST
SELECT FROM(F1) TO(T1) ON(1,11,CH) FIRSTDUP USING(CTL1)
SELECT FROM(F1) TO(T1) ON(1,11,CH) NODUPS USING(CTL2)
COPY FROM(IN1) TO(T1) USING(CTL3)
COPY FROM(IN2) TO(T1) USING(CTL4)
SPLICE FROM(T1) TO(OUT1) ON(1,11,CH) WITHALL WITH(1,45) -
USING(CTL5)
/*
//CTL1CNTL DD *
OUTFIL FNAMES=T1,OVERLAY=(45:C'DD')
/*
//CTL2CNTL DD *
OUTFIL FNAMES=T1,OVERLAY=(45:C'UU')
/*
//CTL3CNTL DD *
OUTFIL FNAMES=T1,OVERLAY=(45:C'11')
/*
//CTL4CNTL DD *
OUTFIL FNAMES=T1,OVERLAY=(45:C'22')
/*
//CTL5CNTL DD *
OUTFIL FNAMES=OUT1,INCLUDE=(45,2,CH,EQ,C'1U'),BUILD=(1,44)
OUTFIL FNAMES=OUT2,INCLUDE=(45,2,CH,EQ,C'2U'),BUILD=(1,11)
OUTFIL FNAMES=OUT12,SAVE,BUILD=(1,44)
/*
Can you please help me in this?
Back to top
Frank Yaeger DFSORT Developer Joined: 15 Feb 2005Posts: 7129 Location: San Jose, CA
Do you need to determine the LRECL automatically, or could you specify it in a record, e.g.
000044
for a run when the LRECL is 44 and
000050
for another run when the LRECL is 50?
Back to top
rajantsr New User Joined: 31 Jan 2007Posts: 21 Location: Chennai
Frank,
Yes It should find automatically...
I am planning to write a generic SYSIN which will be accessed by more than 50 JOBs to compare files.
The overlay character should be appended at the end of record without mentioning explictly the 44 or 50 in the sysin.
Thanks,
Back to top
Frank Yaeger DFSORT Developer Joined: 15 Feb 2005Posts: 7129 Location: San Jose, CA
I'm on vacation today, but I'll see what I can come up with tomorrow.
Back to top
rajantsr New User Joined: 31 Jan 2007Posts: 21 Location: Chennai
No Problem Frank!
Thanks,
Back to top
Frank Yaeger DFSORT Developer Joined: 15 Feb 2005Posts: 7129 Location: San Jose, CA
I started to look at this and came up with another question. You have:
Code:
OUTFIL FNAMES=OUT1,INCLUDE=(45,2,CH,EQ,C'1U'),BUILD=(1,44)
OUTFIL FNAMES=OUT2,INCLUDE=(45,2,CH,EQ,C'2U'),BUILD=(1,11)
I assume 44 is determined from the LRECL. But how is 11 determined?
Does the m in ON(1,m,CH) have to be determined automatically to or is it always 11?
For the example you showed:
What is the LRECL of the IN1 data set?
What is the LRECL of the IN2 data set?
Maybe the answers to these questions are related
Back to top
rajantsr New User Joined: 31 Jan 2007Posts: 21 Location: Chennai
Yes Frank,
44 is determined from the LRECL, 11 is also detemined from the LRECL.
Actually File-1 contains only the account number which is 11 bytes long.
File-2 contains other data including the account number which is 44 bytes long.
We are planning to write a generic card which will be comparing the 11 bytes account number from file-1 to the account number in the file-2 having various LRECL(can be 44, can be 105, can be 80)
Back to top
Frank Yaeger DFSORT Developer Joined: 15 Feb 2005Posts: 7129 Location: San Jose, CA
Here's a DFSORT/ICETOOL job that will do what you asked for. Just put the input file2 name in step S1 and the input file1 and input file2 names in step S2 where indicated. Step S1 will automatically determine the LRECL of input file2 and create DFSORT Symbols based on it. Step S2 will use those Symbols. Note that I fixed up the first SELECT to create 44 byte records as required.
Code:
//S1 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN2 DD DSN=... input file2 (FB/n)
//TEMP1 DD DSN=&&TX,UNIT=SYSDA,SPACE=(TRK,(1,1)),DISP=(,PASS)
//SYM DD DSN=&&S1,UNIT=SYSDA,SPACE=(TRK,(1,1)),DISP=(,PASS)
//TOOLIN DD *
COPY FROM(IN2) USING(CTL1)
COPY FROM(TEMP1) USING(CTL2)
/*
//CTL1CNTL DD *
OPTION STOPAFT=1
OUTFIL FNAMES=TEMP1,FTOV
/*
//CTL2CNTL DD *
OUTFIL FNAMES=SYM,VTOF,
BUILD=(C'SYM1,1,',1,2,BI,SUB,+4,EDIT=(TTTTT),80:X,/,
C'SYM2,',1,2,BI,SUB,+3,EDIT=(TTTTT),C',2',/,
C'SYM3,',1,2,BI,SUB,+4,EDIT=(TTTTT),/,
C'SYM4,1,',1,2,BI,SUB,+3,EDIT=(TTTTT))
/*
//S2 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//SYMNAMES DD DSN=&&S1,DISP=(OLD,PASS)
//SYMNOUT DD SYSOUT=*
//IN1 DD DSN=... input file1 (FB/11)
//IN2 DD DSN=... input file2 (FB/n)
//F1 DD DSN=&&F1,UNIT=SYSDA,SPACE=(CYL,(5,5)),DISP=(MOD,PASS)
//T1 DD DSN=&&T1,UNIT=SYSDA,SPACE=(CYL,(5,5)),DISP=(MOD,PASS)
//OUT1 DD DSN=... output file1 (FB/n)
//OUT2 DD DSN=... output file2 (FB/11)
//OUT12 DD DSN=... output file3 (FB/n)
//TOOLIN DD *
SELECT FROM(IN1) TO(F1) ON(1,11,CH) FIRST USING(CTL0)
SELECT FROM(IN2) TO(F1) ON(1,11,CH) FIRST
SELECT FROM(F1) TO(T1) ON(1,11,CH) FIRSTDUP USING(CTL1)
SELECT FROM(F1) TO(T1) ON(1,11,CH) NODUPS USING(CTL2)
COPY FROM(IN1) TO(T1) USING(CTL3)
COPY FROM(IN2) TO(T1) USING(CTL4)
SPLICE FROM(T1) TO(OUT1) ON(1,11,CH) WITHALL WITH(SYM4) -
USING(CTL5)
/*
//CTL0CNTL DD *
INREC OVERLAY=(SYM3:X)
/*
//CTL1CNTL DD *
OUTFIL FNAMES=T1,OVERLAY=(SYM2:C'DD')
/*
//CTL2CNTL DD *
OUTFIL FNAMES=T1,OVERLAY=(SYM2:C'UU')
/*
//CTL3CNTL DD *
OUTFIL FNAMES=T1,OVERLAY=(SYM2:C'11')
/*
//CTL4CNTL DD *
OUTFIL FNAMES=T1,OVERLAY=(SYM2:C'22')
/*
//CTL5CNTL DD *
OUTFIL FNAMES=OUT1,INCLUDE=(SYM2,CH,EQ,C'1U'),BUILD=(SYM1)
OUTFIL FNAMES=OUT2,INCLUDE=(SYM2,CH,EQ,C'2U'),BUILD=(1,11)
OUTFIL FNAMES=OUT12,SAVE,BUILD=(SYM1)
/*
Back to top
rajantsr New User Joined: 31 Jan 2007Posts: 21 Location: Chennai
Thanks Frank..
It worked well..
Back to top
Please enable JavaScript!