i want to compare if inp1 (XXX-XNB, and XXX-DT ) matches with any record of INP2 file record then inp1 file XXX-XD has to write into output file ... both are same size and same format ... any help is highly appreciated
Inp1
Code:
XXX-XD XXX-XNB XXXX-DT
#2 #3 #4
BI 1:4 AN 5:20 AN 25:10
<---+----1> <---+----1----+----> <---+---->
**** Top of data ****
10 TEMP041 1837-12-31
20 TEMP042 1837-12-31
30 TEMP043 1837-12-31
INp2
Code:
XXX-XD XXX-XNB XXXX-DT
#2 #3 #4
BI 1:4 AN 5:20 AN 25:10
<---+----1> <---+----1----+----> <---+---->
**** Top of data ****
40 TEMP041 1837-12-31
50 TEMP042 1837-12-31
60 TEMP043 1837-12-31
Whats wrong in my code...
it created empty output dataset after running 1hr and also ended with RC 16
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
You need to post the sysout from the failed step.
From the space allocated to your output, it looks like you have a lot of input records.
Does it work when you run it with your test files?
You'll need to make a better description of the process, with sample data, and expected results. If you can show the samples as records rather than as displayed on some screen, it would help.
Are the files in sequence already? At the moment you are SORTing both of input files. Do you need to do that?
You'll need to make a better description of the process, with sample data, and expected results. If you can show the samples as records rather than as displayed on some screen, it would help.
ans: please find the above input files
And my expected output records are from Inp1 XXX-ID when there is only a matching record of both input files fields XXX-NBR and XXX-DT ...
10
20
30
Quote:
Are the files in sequence already? At the moment you are SORTing both of input files. Do you need to do that?
Ans : Files are sorted already. no need to sort them
Quote:
From the space allocated to your output, it looks like you have a lot of input records.
yes
Quote:
You need to post the sysout from the failed step
Code:
ICE411I 0 THIS IS THE JOINKEYS MAIN TASK FOR JOINING F1 AND F2
ICE416I 0 JOINKEYS IS USING THE F1 SUBTASK FOR INP1 - SEE JNF1JMSG MESSAGES
ICE416I 1 JOINKEYS IS USING THE F2 SUBTASK FOR INP2 - SEE JNF2JMSG MESSAGES
ICE419I 0 JOINED RECORDS: TYPE=F, LENGTH=4
ICE201I H RECORD TYPE IS F - DATA STARTS IN POSITION 1
ICE751I 0 C5-K76982 C6-K90026 C7-K94453 C8-K94453 E9-K60824 C9-BASE E5-K80744
ICE143I 0 BLOCKSET COPY TECHNIQUE SELECTED
ICE250I 0 VISIT http://www.ibm.com/storage/dfsort FOR DFSORT PAPERS, EXAMPLES AN
ICE000I 1 - CONTROL STATEMENTS FOR 5694-A01, Z/OS DFSORT V1R12 - 16:12 ON THU MA
OPTION COPY
JOINKEYS F1=INP1,FIELDS=(5,20,A,25,10,A)
JOINKEYS F2=INP2,FIELDS=(5,20,A,25,10,A)
REFORMAT FIELDS=(F1:1,04)
ICE193I 0 ICEAM1 INVOCATION ENVIRONMENT IN EFFECT - ICEAM1 ENVIRONMENT SELECTED
ICE252I 1 PARMLIB OPTIONS WERE MERGED WITH INSTALLATION MODULE DEFAULTS
ICE089I 0 XXXX.PS030 . , INPUT LRECL = 4, TYPE = F
ICE252I 1 PARMLIB OPTIONS WERE MERGED WITH INSTALLATION MODULE DEFAULTS
ICE089I 0 XXXX.PS030 . , INPUT LRECL = 4, TYPE = F
ICE093I 0 MAIN STORAGE = (MAX,6291456,6291456)
ICE156I 0 MAIN STORAGE ABOVE 16MB = (6189040,6189040)
ICE127I 0 OPTIONS: OVFLO=RC0 ,PAD=RC0 ,TRUNC=RC0 ,SPANINC=RC16,VLSCMP=N,SZERO=Y,
ICE128I 0 OPTIONS: SIZE=6291456,MAXLIM=1048576,MINLIM=450560,EQUALS=N,LIST=Y,ERE
ICE129I 0 OPTIONS: VIO=N,RESDNT=NONE,SMF=FULL ,WRKSEC=Y,OUTSEC=Y,VERIFY=N,CHALT=
ICE130I 0 OPTIONS: RESALL=4096,RESINV=0,SVC=109 ,CHECK=Y,WRKREL=Y,OUTREL=Y,CKPT=
ICE131I 0 OPTIONS: TMAXLIM=6291456,ARESALL=0,ARESINV=0,OVERRGN=65536,CINV=Y,CFW=
ICE132I 0 OPTIONS: VLSHRT=N,ZDPRINT=Y,IEXIT=N,TEXIT=N,LISTX=N,EFS=NONE ,EXITC
ICE133I 0 OPTIONS: HIPRMAX=OPTIMAL,DSPSIZE=256 ,ODMAXBF=0,SOLRF=Y,VLLONG=N,VSAMI
ICE235I 0 OPTIONS: NULLOUT=RC0
ICE236I 0 OPTIONS: DYNAPCT=10 ,MOWRK=Y
ICE084I 0 EXCP ACCESS METHOD USED FOR SORTOUT
ICE805I 1 JOBNAME: XXXX , STEPNAME: PS030
ICE802I 0 BLOCKSET TECHNIQUE IN CONTROL
ICE889I 0 CT=MAX , SB=8, L=0, D=0000, CCW=1MAM
ICE889I 0 CT=MAX , SB=8, L=0, D=0000, CCW=1MAM
ICE902I 0 O PP10 I
ICE039A 1 INSUFFICIENT MAIN STORAGE - ADD AT LEAST 28K BYTES
ICE751I 1 EF-BASE E8-K94453
ICE052I 0 END OF DFSORT
Quote:
Does it work when you run it with your test files?
Currently Running in test env
yep i checked and i restarted the job after that.... but next time it went successfull but no output ... wondering what is the reason...is there any problem in joinkeys or sort fields ... no idea... but I feel what i coded was correct ...
Please Cut Paste your sysout all the time when you make a try and show us the Job as well along with sample data.And I suspect none of the JOIN condition got satisfied and hence you got empty file so please check all the offsets and joins again.
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
You still seem to think you want "if any key in File 1 matches any key in File 2 output all records in File 1".
If that is what you want, please explain how that would happen without you coding anything? Also, how would it happen in one step, short of having a massive cartesian join, which would be unlikely to complete any time soon?
You don't even get matched records, which is what your code should get. You haven't shown the data how I asked. We don't know (no sysout for it) the RECFM of your inputs.
You didn't explain how things went with your test file. You didn't show all the sysout from the step (perhaps you don't have DDs for the joinkeys tasks?).
If someone asks you to explain because what you have said so far is unclear, and for your new explanation you just refer to the original - what type of assistance do you feel will be forthcoming?
Joined: 07 Dec 2007 Posts: 2205 Location: San Jose
nkothako wrote:
yep i checked and i restarted the job after that.... but next time it went successfull but no output ... wondering what is the reason...is there any problem in joinkeys or sort fields ... no idea... but I feel what i coded was correct ...
Read the first bullet point in here about region size when running joinkeys
Your Reformat statement is creating a 4 byte file but your JCL has an hardcoded LRECL of 10 which is quite unnecessary as the filler bytes with binary zeros.