Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Syncsort Match between two hex records

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
zavedali85

New User


Joined: 17 Oct 2008
Posts: 10
Location: Pune

PostPosted: Fri Aug 21, 2009 11:29 pm    Post subject: Syncsort Match between two hex records
Reply with quote

I have two files File A and File B (both have recfm VB).

The files are to be matched on hex values at position 10 (length is 6) from File A and at position 5 (length 6) from File B .If match found then extract the File A record that matches File B in a separate File C.

The File Data looks as below:

File A (Hex on):

ABCRFGFT1
F454F786A034000
78677887F00010C

File B (Hex on):

DEFR
342F034000
567400010C

Output File C:

ABCRFGFT1
F454F786A034000
78677887F00010C

Please suggest how to obtain.
Back to top
View user's profile Send private message

dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Sat Aug 22, 2009 12:23 am    Post subject:
Reply with quote

Hello,

Why have you chosen to call these "hex'? The data appears to simply be packed-decimal (comp-3 to cobol people).

Are both files already in sequence by this field?

What about negative values? Might there be 'F' signs as well as 'C' signs in the field(s)?
Back to top
View user's profile Send private message
zavedali85

New User


Joined: 17 Oct 2008
Posts: 10
Location: Pune

PostPosted: Sat Aug 22, 2009 10:02 am    Post subject:
Reply with quote

Hi,

The field is at position 10 in File A and at position 5 in File B.

Also the field is Positive signed Packed Decimal.
Back to top
View user's profile Send private message
Pandora-Box

Moderator


Joined: 07 Sep 2006
Posts: 1542
Location: Andromeda Galaxy

PostPosted: Sat Aug 22, 2009 2:31 pm    Post subject:
Reply with quote

Hi zavedali85,

I am assuming this is what your requirement

Code:


//SORTJNF1 DD *                                                                 
7çîå7ÌhÅ®.. ...                                                                 
//*                                                                             
//SORTJNF2 DD *                                                                 
.ã.4.. ...                                                                     
//*                                                                             
//SORTOUT  DD SYSOUT=*                                                         
//SYSOUT   DD SYSOUT=*                                                         
//*                                                                             
//SYSIN    DD *                                                                 
  JOINKEYS FILES=F1,FIELDS=(10,6,A)                                             
  JOINKEYS FILES=F2,FIELDS=(5,6,A)                                             
    SORT FIELDS=COPY                                                           
  REFORMAT FIELDS=(F1:1,20)                                                     

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 -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts sort records based on length exceeds ... maxsubrat DFSORT/ICETOOL 7 Wed Oct 04, 2017 4:48 pm
No new posts Addition of two records on 2 fields amar143 SYNCSORT 8 Tue Oct 03, 2017 11:14 am
No new posts Split 1 file into 10 output Files - S... Prasanth Kumar SYNCSORT 5 Sat Sep 16, 2017 12:02 am
No new posts Join records from 2 files with No Dup... Poha Eater DFSORT/ICETOOL 22 Sun Aug 27, 2017 10:35 pm
No new posts Match two files using multiple keys a... santoshks1987 SYNCSORT 11 Fri Aug 18, 2017 10:50 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us