IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Need help on comparing hexadecimal values


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
ashok_uddaraju

New User


Joined: 21 Feb 2007
Posts: 72
Location: US

PostPosted: Thu Apr 28, 2016 2:08 am
Reply with quote

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
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 3053
Location: NYC,USA

PostPosted: Thu Apr 28, 2016 3:42 am
Reply with quote

Why do you not do some research before posting, as I could see a lot of examples over here?
Back to top
View user's profile Send private message
ashok_uddaraju

New User


Joined: 21 Feb 2007
Posts: 72
Location: US

PostPosted: Thu Apr 28, 2016 4:21 am
Reply with quote

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
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 3053
Location: NYC,USA

PostPosted: Thu Apr 28, 2016 7:20 am
Reply with quote

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
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Thu Apr 28, 2016 12:15 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts Null values are considered in Total c... DFSORT/ICETOOL 6
No new posts Converting ASCII values to COMP-3 (ZD... JCL & VSAM 2
No new posts Generate output lines (SYSIN card for... DFSORT/ICETOOL 4
Search our Forums:

Back to Top