|
View previous topic :: View next topic
|
| Author |
Message |
ashok_uddaraju
New User
Joined: 21 Feb 2007 Posts: 72 Location: US
|
|
|
|
Hi All,
I am trying to compare 2 files with a key which is hexadecimal. I use sort utility earlier to compare the regular characters. Can we use this for hexadecimal as well ?
| Code: |
000004 //STEP02 EXEC PGM=SORT
000005 //SORTJNF1 DD DISP=SHR,DSN=File1
000006 //SORTJNF2 DD DISP=SHR,DSN=file2
000007 //SYSIN DD *
000008 JOINKEYS FILE=F1,
000009 FIELDS=(15,15,A)
000010 JOINKEYS FILE=F2,
000011 FIELDS=(15,15,A)
000012 REFORMAT FIELDS=(F1:1,27994)
000013 SORT FIELDS=COPY
000014 //SORTOUT DD DSN=output,
000015 // DISP=(NEW,CATLG,DELETE),
000016 // SPACE=(CYL,(10,10),RLSE),UNIT=SYSDA
000017 //SYSOUT DD SYSOUT=* |
code' d |
|
| Back to top |
|
 |
Rohit Umarjikar
Global Moderator

Joined: 21 Sep 2010 Posts: 3112 Location: NYC,USA
|
|
|
|
| Why do you not do some research before posting, as I could see a lot of examples over here? |
|
| Back to top |
|
 |
ashok_uddaraju
New User
Joined: 21 Feb 2007 Posts: 72 Location: US
|
|
|
|
my input files are VB files with record length 27994 and when i used the below sort card
| Code: |
000015 JOINKEYS FILES=F1,FIELDS=(28,20,A)
000016 JOINKEYS FILES=F2,FIELDS=(28,20,A)
000017 REFORMAT FIELDS=(F1:1,27994,F2:1,27994),FILL=X'FF'
000018 JOIN UNPAIRED,F1
000019 SORT FIELDS=COPY
000020 OUTFIL FILES=01,INCLUDE=(27999,1,BI,NE,X'FF'),
000021 OUTREC=(5,27990),FTOV,VLTRIM=X'FF'
000022 OUTFIL FILES=02,SAVE,OUTREC=(5,27990),FTOV,VLTRIM=X'FF'
000023 //* |
it fails "REFORMAT FIELD OUTSIDE RANGE". I tried adding 4 bytes as well but still the same issue
code' d AGAIN |
|
| Back to top |
|
 |
Rohit Umarjikar
Global Moderator

Joined: 21 Sep 2010 Posts: 3112 Location: NYC,USA
|
|
|
|
You need to exclude the RDW , hence out of range.
However, please use code tags when you represents any code and you have been here for 9 years now. Check out this and try again. |
|
| Back to top |
|
 |
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
I suggest you check the documentation for the maximum record-lengths supported for the REFORMAT statement.
The question is moot now, but if you had wanted variable-length reformat records, you must include the RDW. If you wanted fixed-length, then no.
If you genuinely have records which can be up to that length, then you won't be JOINing them in a single step. |
|
| Back to top |
|
 |
|
|
 |
All times are GMT + 6 Hours |
|