View previous topic :: View next topic
|
Author |
Message |
Habeeb Shaik
New User
Joined: 29 Aug 2005 Posts: 10
|
|
|
|
Hi,
Can any give me a JCL for comparing two flat files, each of record lenth 2000. The output should be of lenth 2000.
I have used super c but the result is of 133 chars lenth.
//SUPERC EXEC PGM=ISRSUPC,
// PARM=(DELTAL,LINECMP,
// ' NOSEQ',
// '')
thanks,
Habeeb. |
|
Back to top |
|
|
Escapa
Senior Member
Joined: 16 Feb 2007 Posts: 1399 Location: IL, USA
|
|
|
|
You can use utilities like sort on output file generated from ISRSUPC to change LRECL. |
|
Back to top |
|
|
Habeeb Shaik
New User
Joined: 29 Aug 2005 Posts: 10
|
|
|
|
I have the LRECL as 2000 only for the out file, even though the output is of lenth 132chars. Is there any sysin commands which can increase the lenth to userdefined. |
|
Back to top |
|
|
Escapa
Senior Member
Joined: 16 Feb 2007 Posts: 1399 Location: IL, USA
|
|
|
|
Most important questions arises is why you want to increase LRECL un-necessarily when it is managed with 133? It is mare wastage of space..
If you could explain your need of doing so then probably people here will be able to help you out better. |
|
Back to top |
|
|
Habeeb Shaik
New User
Joined: 29 Aug 2005 Posts: 10
|
|
|
|
Let me be very clear. I have to compare two sequential files which is having records of length 2000. I want all the records from two files which are having the differences.
This is my requirement. Plz let me know if you want any more details.
Thanks,
Habeeb. |
|
Back to top |
|
|
Vijayakumar Mani
New User
Joined: 24 Oct 2007 Posts: 11 Location: Salem
|
|
|
|
Hi Habeeb,
Out of the record length 2000, which field do you want to compare? I am giving here the code which compares entire record of length 2000.
You are saying that you need the records which are different. If so, i think you need the output by ommiting the records which are found in both the files.
If my understanding in correct, here is the SORT step which may help you (If only two files are to be compared).
Code: |
//SORTIN DD DSN=FILE1,DISP=SHR
// DD DSN=FILE2,DISP=SHR
//SORTOUT DD DSN=OUTFILE,DISP=SHR
//SYSIN DD *
INREC OVERLAY=(2001:C'00000001')
SORT FIELDS=(1,2000,CH,A)
SUM FIELDS=(2001,8,ZD)
OUTFIL FNAMES=SORTOUT,INCLUDE=(2001,8,ZD,EQ,1)
OUTREC=(1,2000)
/* |
|
|
Back to top |
|
|
Aaru
Senior Member
Joined: 03 Jul 2007 Posts: 1287 Location: Chennai, India
|
|
|
|
Vijayakumar Mani,
I don't think this is an efficient way of doing this. I think you have too many control statements for a simple requiremt.
Habeeb,
Quote: |
I have to compare two sequential files which is having records of length 2000. I want all the records from two files which are having the differences. |
This can be done in a single SORT step. Mention u r requirement clearly and the key fields to compare. |
|
Back to top |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
Habeeb,
Do you have duplicate key records in input. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
The output should be of lenth 2000. |
SUPERC will not show 2000 characters of comparison. |
|
Back to top |
|
|
darkstar13
New User
Joined: 06 Nov 2008 Posts: 46 Location: Manila, Philippines
|
|
|
|
I think the main problem is that SUPERC is not showing the difference for fields beyond column 133 (Am I right?). You can use the LONGLN parameter, however, it will only show the fields upto 176.
If you know which fields in your record that will show changes, then you can use CMPCOLMO/CMCOLMN (in SUPERCE panel, click on OPTIONS, then [1] for EDIT STATEMENTS):
Code: |
Menu Utilities Options Help
1 1. Edit Statements
Command ===> 2. Process Options
3. Profiles and Defaults
New DS Name . . |
However, if you don't know which fields will show error, I suggest you use COMPAREX, InSync or other compare utilities available at your shop. |
|
Back to top |
|
|
|