View previous topic :: View next topic
Author
Message
Lopamudra Mukherjee New User Joined: 13 Feb 2010Posts: 3 Location: Calcutta
I have two files having LRECL=232 and FB
First file has the structure
USERID(1 to 7 position) ex :a111111,a111112 etc
Space ( 8th position)
SYSTEMCODE (9 to 11 position) ex: AB*
a111111 AB1
a111111 AB4
a111111 AB7
a111112 AB1
a111112 AB2
a111112 AB3
a111112 AB4
a111113 AB2
a111113 AB3
Second File has the structure
USERID(1 to 7 position)
Space ( 8th position)
SYSTEMCODE 1 (9 to 11 position)
Space ( 12th position)
SYSTEMCODE 2 (13 to 15 position)
Space ( 14th position)
-
-
-
_____UPTO system code 9 is possible----
a111111 AB1 AB4 AB7
a111112 AB1 AB3 AB4 AB2
a111112 AB2 AB3
The system codes in second file is not in sorted order so in the second record the sequence is 1,3,4,2
instead of 1,2,3,4
But The system codes in first file is sorted
the data in the above two files are the same but in different format.
We need to compare two files to ensure the data are the same.
So to validate above two files using ICETOOL or DFSORT , I reuire first file to be formatted as
a111111 AB1 AB4 AB7
a111112 AB1 AB2 AB3 AB4
a111113 AB2 AB3
and the second file to be formatted as the same as first file
a111111 AB1 AB4 AB7
a111112 AB1 AB2 AB3 AB4
a111113 AB2 AB3
Please let me know if it is can be done using ICETOOL
Back to top
Escapa Senior Member Joined: 16 Feb 2007Posts: 1399 Location: IL, USA
Quote:
So to validate above two files using ICETOOL or DFSORT , I reuire first file to be formatted as
a111111 AB1 AB4 AB7
a111112 AB1 AB2 AB3 AB4
a111113 AB2 AB3
and the second file to be formatted as the same as first file
a111111 AB1 AB4 AB7
a111112 AB1 AB2 AB3 AB4
a111113 AB2 AB3
Please let me know if it is can be done using ICETOOL
Yes definitely this can be done. but after doing that how do you validate? are you going to manually validate the files?
Back to top
Escapa Senior Member Joined: 16 Feb 2007Posts: 1399 Location: IL, USA
Also second input file data you have shown is
Code:
a111111 AB1 AB4 AB7
a111112 AB1 AB3 AB4 AB2
a111112 AB2 AB3
But I believe you mean..
Code:
a111111 AB1 AB4 AB7
a111112 AB1 AB3 AB4 AB2
a111113 AB2 AB3
Please confirm...
Back to top
Escapa Senior Member Joined: 16 Feb 2007Posts: 1399 Location: IL, USA
Below steps will give you what you wanted...
If data in both input files is same then final output file will be empty.
If data is present only in first file then that will appear in final output file with value 1 at 23rd position
If data is present only in second file then that will appear in final output file with value 2 at 23rd position....
Code:
//STEP0100 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD *
A111111 AB1 AB4 AB7
A111112 AB1 AB3 AB4 AB2
A111113 AB2 AB3 AB4
//SORTOUT DD DSN=&&TEMP,DISP=(NEW,PASS)
//SYSIN DD *
OPTION COPY
OUTFIL BUILD=(1,8,9,3,/,
1,8,13,3,/,
1,8,17,3,/,
1,8,21,3,/,
1,8,25,3,/,
1,8,29,3,/,
1,8,33,3,/,
1,8,37,3,/,
1,8,41,3)
/*
//STEP0200 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//FIRST DD *
A111111 AB1
A111111 AB4
A111111 AB7
A111112 AB1
A111112 AB2
A111112 AB3
A111112 AB4
A111113 AB2
A111113 AB3
A111113 AB6
//SECOND DD DSN=&&TEMP,DISP=(MOD,PASS)
//JNF2CNTL DD *
OMIT COND=(9,3,CH,EQ,C' ')
//SORTOUT DD SYSOUT=*
//SYSIN DD *
OPTION COPY
JOINKEYS F1=FIRST,FIELDS=(1,11,A)
JOINKEYS F2=SECOND,FIELDS=(1,11,A),SORTED
JOIN UNPAIRED,ONLY
REFORMAT FIELDS=(F1:1,11,F2:1,11,?)
/*
Output in this case will be...
Code:
A111113 AB42
A111113 AB6 1
Back to top
Lopamudra Mukherjee New User Joined: 13 Feb 2010Posts: 3 Location: Calcutta
Thanks a lot for your help . But JOINKEYS are not supported in my my version of DFSORT . The Job giving RC 16 with following messages
Messages ******
ICE000I 1 - CONTROL STATEMENTS FOR 5694-A01, Z/OS DFSORT V1R10 - 03:49
OPTION COPY
JOINKEYS F1=FIRST,FIELDS=(1,11,A)
$
ICE005A 0 BLANK NEEDED IN COLUMN 1 OR OPERATION NOT DEFINED CORRECTLY
Messages ******
Back to top
Escapa Senior Member Joined: 16 Feb 2007Posts: 1399 Location: IL, USA
Back to top
Lopamudra Mukherjee New User Joined: 13 Feb 2010Posts: 3 Location: Calcutta
yes... it does...
I can modify and customize it according to my need afterwards.
Back to top
Escapa Senior Member Joined: 16 Feb 2007Posts: 1399 Location: IL, USA
Lopamudra Mukherjee wrote:
yes... it does...
I can modify and customize it according to my need afterwards.
You haven't answered my second request.....
Back to top
Please enable JavaScript!