I have two files and would like to write on output file if they match.
I have another file it contains only trailer record. I need to update this file with actual number of matched records. Could you please help efficient way to do this.
What I know is use ICETOOL Splice operator to match two files. But to get the count use ICEMAN facility to get the count and write on to temp file. Then in next step take that temp count value and overlay on existing trailer record.
Joined: 07 Dec 2007 Posts: 2205 Location: San Jose
csreenivasulu,
Please answer the following questions
1. What is the LRECL and RECFM of file1
2. What is the LRECL and RECFM of file2
3. What is the position of the key and format of the key in file1?
4. What is the position of the key and format of the key in file2?
5. Does any of the file have duplicates on the key
6. What is the LRECL and RECFM of the Matched file?
7. what is the LRECL and RECFM of the trailer file?
Hi Kolusu,
Thanks for your reply.
Please find answers for your queries below.
1. What is the LRECL and RECFM of file1
LRECL=9, RECFM=FB
2. What is the LRECL and RECFM of file2
LRECL=175,RECFM=FB
3. What is the position of the key and format of the key in file1?
POSITION OF THE KEY:1, FORMAT = CH
4. What is the position of the key and format of the key in file2?
POSITION OF THE KEY:1, FORMAT = CH
5. Does any of the file have duplicates on the key ?
yES. File 2 contains duplicates
6. What is the LRECL and RECFM of the Matched file?
LRECL=175,RECFM=FB
7. what is the LRECL and RECFM of the trailer file?
LRECL=80,RECFM=FB, Count need to put on position 5 and length 14.
8. Please find the sysout from the above job.
Display Filter View Print Options Help
-------------------------------------------------------------------------------
SDSF OUTPUT DISPLAY DEVDW14X JOB25897 DSID 104 LINE 0 COLUMNS 01- 80
COMMAND INPUT ===> SCROLL ===> CSR
********************************* TOP OF DATA **********************************
1ICE143I 0 BLOCKSET COPY TECHNIQUE SELECTED
ICE250I 0 VISIT www.ibm.com/storage/dfsort FOR DFSORT PAPERS, EXAMPLES A
ICE000I 1 - CONTROL STATEMENTS FOR 5694-A01, Z/OS DFSORT V1R5 - 09:12 ON FRI OC
0 SORT FIELDS=COPY
ICE201I E RECORD TYPE IS F - DATA STARTS IN POSITION 1
ICE751I 0 C5-K90007 C6-K90007 C7-K90000 C8-K90007 E9-K90007 C9-BASE E5-K18181
ICE193I 0 ICEAM1 ENVIRONMENT IN EFFECT - ICEAM1 INSTALLATION MODULE SELECTED
ICE088I 0 DEVDW14X.PSTP010 . , INPUT LRECL = 80, BLKSIZE = 80, TYPE = FB
ICE093I 0 MAIN STORAGE = (MAX,6291456,6278238)
ICE156I 0 MAIN STORAGE ABOVE 16MB = (6200798,6200798)
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,ER
ICE129I 0 OPTIONS: VIO=N,RESDNT=ALL ,SMF=SHORT,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 ,EXIT
ICE133I 0 OPTIONS: HIPRMAX=OPTIMAL,DSPSIZE=MAX ,ODMAXBF=0,SOLRF=Y,VLLONG=N,VSAM
ICE235I 0 OPTIONS: NULLOUT=RC0
ICE235I 0 OPTIONS: NULLOUT=RC0
ICE084I 0 BSAM ACCESS METHOD USED FOR SORTOUT
ICE084I 0 BSAM ACCESS METHOD USED FOR SORTIN
ICE751I 1 EF-K10929 F0-Q84357 E8-K19114
ICE090I 0 OUTPUT LRECL = 80, BLKSIZE = 80, TYPE = FB
ICE055I 0 INSERT 0, DELETE 0
ICE054I 0 RECORDS - IN: 1, OUT: 1
ICE026I 1 SMF RECORD NOT WRITTEN TO THE SMF DATA SET(RC=20)
ICE052I 0 END OF DFSORT
******************************** BOTTOM OF DATA *******************************
Sorry to trouble you again. As I wrote earlier I got almost the results I wanted, but I want to override the existing trailer file. The trailer file first 5 bytes contains file creation date in packed format. Would it possible with OVERLAY option. I tried with this option, but Syntax not correct.
Joined: 07 Dec 2007 Posts: 2205 Location: San Jose
csreenivasulu,
Quote:
Sorry to trouble you again. As I wrote earlier I got almost the results I wanted, but I want to override the existing trailer file. The trailer file first 5 bytes contains file creation date in packed format. Would it possible with OVERLAY option. I tried with this option, but Syntax not correct.
Is it that date the current date? or any other date? Do you have any other fields that you need to retain from that trailer file?
This date is some other date, not current date. I have another field to retain in the file. First 5 bytes date, next 14bytes count, after that 8bytes program name.