SYNCSORT 3.7DRI TPF3A US PATENTS: 4210961,5117495, OTHER PAT. PEND. (C) 1998 S
* PERSHING LLC. * z/OS 1.4.0 CPU MODEL 2
CTL1CNTL :
SORT FIELDS=(1,9,CH,A)
OUTFIL FNAMES=T1,OUTREC=(1,80,C'1')
PARMLIST :
OPTION RESINV=0,ARESINV=0,MSGDDN=DFSMSG,SORTIN=IN1,SORTDD=CTL1,DYNALLOC
WER038I WARNING: SYNCSORT MVS IS NOT CERTIFIED TO RUN ON Z/OS. CONTACT SYNCSOR
WER428I CALLER-PROVIDED IDENTIFIER IS "0001"
WER164B 12,808K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED,
WER164B 0 BYTES RESERVE REQUESTED, 12,268K BYTES USED
WER146B 20K BYTES OF EMERGENCY SPACE ALLOCATED
WER108I IN1 : RECFM=FB ; LRECL= 80; BLKSIZE= 80
WER110I T1 : RECFM=FB ; LRECL= 81; BLKSIZE= 27945
WER410B 11,780K BYTES OF VIRTUAL STORAGE AVAILABLE ABOVE THE 16MEG LINE,
WER410B 0 BYTES RESERVE REQUESTED, 11,776K BYTES USED
WER036B G=25957,B=674
WER162B 0 PREALLOCATED SORTWORK TRACKS, 240 DYNAMICALLY ALLOCATED,
WER162B 0 ACQUIRED IN SECONDARY EXTENTS, 0 RELEASED, TOTAL OF 1 TRACKS USED
WER045C END SORT PHASE
WER405I T1 : DATA RECORDS OUT 6; TOTAL RECORDS OUT 6
WER211B SYNCSMF CALLED BY SYNCSORT; RC=0000
WER449I SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE
WER416B BSAM WAS USED FOR IN1
WER416B OUTFIL WAS USED FOR CTL1OUT
WER416B CTL1WK01: EXCP'S=5,UNIT=3390,DEV=952D,CHP=2FB42E6DB56F6E6C,VOL=TPUB50
WER416B TOTAL OF 5 EXCP'S ISSUED FOR SORTWORKS
WER246I FILESIZE 480 BYTES
WER054I RCD IN 6, OUT 6
WER169I RELEASE 3.7D BATCH 0366 TPF LEVEL 3A
WER052I END SYNCSORT - TSOTEKA2,STEP0100,,DIAG=E800,ACD8,02D4,24BD,E9D6,ACC9,0
SYNCSORT 3.7DRI TPF3A US PATENTS: 4210961,5117495, OTHER PAT. PEND. (C) 1998 S
* PERSHING LLC. * z/OS 1.4.0 CPU MODEL 2
CTL2CNTL :
SORT FIELDS=(1,9,CH,A)
OUTFIL FNAMES=T2,OUTREC=(1,80,C'2')
PARMLIST :
OPTION RESINV=0,ARESINV=0,MSGDDN=DFSMSG,SORTIN=IN2,SORTDD=CTL2,DYNALLOC
WER038I WARNING: SYNCSORT MVS IS NOT CERTIFIED TO RUN ON Z/OS. CONTACT SYNCSO
WER428I CALLER-PROVIDED IDENTIFIER IS "0002"
WER164B 12,808K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED,
WER164B 0 BYTES RESERVE REQUESTED, 12,268K BYTES USED
WER146B 20K BYTES OF EMERGENCY SPACE ALLOCATED
WER108I IN2 : RECFM=FB ; LRECL= 80; BLKSIZE= 80
WER110I T2 : RECFM=FB ; LRECL= 81; BLKSIZE= 27945
WER410B 11,780K BYTES OF VIRTUAL STORAGE AVAILABLE ABOVE THE 16MEG LINE,
WER410B 0 BYTES RESERVE REQUESTED, 11,776K BYTES USED
WER036B G=25957,B=674
WER162B 0 PREALLOCATED SORTWORK TRACKS, 240 DYNAMICALLY ALLOCATED,
WER162B 0 ACQUIRED IN SECONDARY EXTENTS, 0 RELEASED, TOTAL OF 1 TRACKS USE
WER045C END SORT PHASE
WER405I T2 : DATA RECORDS OUT 3; TOTAL RECORDS OUT 3
WER211B SYNCSMF CALLED BY SYNCSORT; RC=0000
WER449I SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE
WER416B BSAM WAS USED FOR IN2
WER416B OUTFIL WAS USED FOR CTL2OUT
WER416B CTL2WK01: EXCP'S=5,UNIT=3390,DEV=9537,CHP=2FB42E6DB56F6E6C,VOL=TPUB6
WER416B TOTAL OF 5 EXCP'S ISSUED FOR SORTWORKS
WER246I FILESIZE 240 BYTES
WER054I RCD IN 3, OUT 3
WER169I RELEASE 3.7D BATCH 0366 TPF LEVEL 3A
WER052I END SYNCSORT - TSOTEKA2,STEP0100,,DIAG=E200,A696,08D4,68B7,E3D6,A687,
SYNCSORT 3.7DRI TPF3A US PATENTS: 4210961,5117495, OTHER PAT. PEND. (C) 1998
* PERSHING LLC. * z/OS 1.4.0 CPU MODEL
CTL3CNTL :
SORT FIELDS=(1,10,CH,A)
SUM FIELDS=(81,1,ZD)
OUTFIL FNAMES=OUT,INCLUDE=(81,1,ZD,EQ,3),OUTREC=(1,80)
OUTFIL FNAMES=FILEA,INCLUDE=(81,1,CH,EQ,C'1'),OUTREC=(1,80)
OUTFIL FNAMES=FILEB,INCLUDE=(81,1,CH,EQ,C'2'),OUTREC=(1,80)
PARMLIST :
OPTION RESINV=0,ARESINV=0,MSGDDN=DFSMSG,SORTIN=INT,SORTDD=CTL3,DYNALLOC
WER038I WARNING: SYNCSORT MVS IS NOT CERTIFIED TO RUN ON Z/OS. CONTACT SYNCSO
WER428I CALLER-PROVIDED IDENTIFIER IS "0003"
WER164B 20,460K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED,
WER164B 0 BYTES RESERVE REQUESTED, 20,240K BYTES USED
WER146B 20K BYTES OF EMERGENCY SPACE ALLOCATED
WER108I INT : RECFM=FB ; LRECL= 81; BLKSIZE= 27945
WER110I OUT : RECFM=FB ; LRECL= 80; BLKSIZE= 80
WER110I FILEA : RECFM=FB ; LRECL= 80; BLKSIZE= 80
WER110I FILEB : RECFM=FB ; LRECL= 80; BLKSIZE= 80
WER410B 19,432K BYTES OF VIRTUAL STORAGE AVAILABLE ABOVE THE 16MEG LINE,
WER410B 0 BYTES RESERVE REQUESTED, 19,428K BYTES USED
WER036B G=721,B=626
WER045C END SORT PHASE
WER055I INSERT 0, DELETE 1
WER418I DATASPACE(S) AND/OR HIPERSPACE(S) USED
WER405I OUT : DATA RECORDS OUT 0; TOTAL RECORDS OUT 0
WER405I OUT : DATA RECORDS OUT 0; TOTAL RECORDS OUT 0
WER405I FILEA : DATA RECORDS OUT 5; TOTAL RECORDS OUT 5
WER405I FILEB : DATA RECORDS OUT 2; TOTAL RECORDS OUT 2
WER211B SYNCSMF CALLED BY SYNCSORT; RC=0000
WER416B INT: EXCP'S=2,UNIT=3390,DEV=9537,CHP=2FB42E6DB56F6E6C,VOL=TPUB6
WER416B OUTFIL WAS USED FOR CTL3OUT
WER246I FILESIZE 729 BYTES
WER054I RCD IN 9, OUT 8
WER169I RELEASE 3.7D BATCH 0366 TPF LEVEL 3A
WER052I END SYNCSORT - TSOTEKA2,STEP0100,,DIAG=C700,064D,28D4,A006,C6C6,064D,
There are 2 files file1 and file2, both are having the same layout.
Code:
HEADER
FIELD1 X VALUE '1'
FIELD2 X(6) VALUE 'HDRABC'
FIELD3 X(10) VALUE 'YYYY-MM-DD'
FIELD4 X(05)
FIELD5 X(06)
DETAIL
FIELDA X(5)
FIELDB X(6)
total X(16)
TRAILER RECORD
FIELDT1 X VALUE '5'
FIELDT2 X(6) VALUE 'TRLXYZ'
FIELDT3 X(10)
total X(16)
Output file
FIELDA X(5) FROM THE DETAIL RECORD
TOTAL X(16) FROM THE DETAIL RECORD
I need to do the file matching in the COBOL
- write all the records from the file1 which are not there in file2
- write all the records from the file2 which are not there in file1
- if the key(FIELDA in the detail record) matches in file1,file2 then there should be only one record in the output file with the summation of the total(DETAIL RECORD) of file1 and file2.
- TOTAL of trailer record is the total of all the detail records. I need to check whether total of all the detail records are matching with the total of trailer record's total in each file.
Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
Posted: Sun Nov 20, 2005 7:38 pm Post subject:
Dhulipala,
1. Sort both files on the first 5 bytes. Make sure that the header and trailer stays as is.
2. Use the cobol logic in the first post of this topic
3. Declare 3 working storage variables.
a. variable to hold the total for matching keys
b. variable to hold the running total of all records in file1.
c. variable to hold the running total of all records in file2.
I handled that part and I am new to writing a program which handles Header and Trailer..In other terms how can I validate the Header and Trailer while reading?
Posted: Thu Dec 01, 2005 3:07 pm Post subject: SUM FIELDS - What is the maximum length it can accept
Hi Kolusu,
Thanks for positng this solution. It is really helpful.
I would like to use this code to compare the data in DB2 environments.
But my SORT FIELDS key would be the entire table length (cumulative of all column lengths). Is there a maximum limiit to this option.
one of our table has a length of 6000, I want to compare the entire length. Can I do it.
Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
Posted: Thu Dec 01, 2005 3:20 pm Post subject:
Quote:
But my SORT FIELDS key would be the entire table length (cumulative of all column lengths). Is there a maximum limiit to this option.
one of our table has a length of 6000, I want to compare the entire length. Can I do it.
All times are GMT - 5 Hours Goto page Previous1, 2, 3Next
Page 2 of 3
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum