Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Need help on comparing hexadecimal values

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
ashok_uddaraju

New User


Joined: 21 Feb 2007
Posts: 70
Location: bangalore

PostPosted: Thu Apr 28, 2016 2:08 am    Post subject: Need help on comparing hexadecimal values
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

Senior Member


Joined: 21 Sep 2010
Posts: 1610
Location: NY,USA

PostPosted: Thu Apr 28, 2016 3:42 am    Post subject:
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: 70
Location: bangalore

PostPosted: Thu Apr 28, 2016 4:21 am    Post subject: Reply to: Need help on comparing hexadecimal values
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

Senior Member


Joined: 21 Sep 2010
Posts: 1610
Location: NY,USA

PostPosted: Thu Apr 28, 2016 7:20 am    Post subject:
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7241

PostPosted: Thu Apr 28, 2016 12:15 pm    Post subject: Reply to: Need help on comparing hexadecimal values
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    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Overlaying one set of charater values... Kevin Lindsley SYNCSORT 7 Sat Nov 05, 2016 3:21 am
No new posts Comparing Decimal and CHAR columns rakesh17684 DB2 7 Thu Oct 20, 2016 2:33 am
No new posts Low values Results from VARCHAR FORMAT balaji81_k DB2 10 Thu Oct 20, 2016 1:18 am
No new posts How can we create a flat file in JAVA... rakesh.v18 Java & MQSeries 7 Fri Sep 23, 2016 10:46 pm
No new posts Using 'parm' to vary SORTOUT record v... Sysaron DFSORT/ICETOOL 13 Wed Sep 07, 2016 9:24 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us