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

How to convert data using outrec format


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

New User


Joined: 01 Dec 2005
Posts: 3

PostPosted: Thu Dec 01, 2005 3:54 pm
Reply with quote

Hi.
I want to find identical records out of 2 files, and save result.
Each of these 2 files has a common key with different format :
Inputfile1 (I1) key is a 6 positions numeric (eq Pic 9(6))
Inputfile2 (I2) key is a 4 positions hexadecimal

how can i compare those 2 keys, match records and save result ? icon_idea.gif

Thanks for your help.
Regards.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Thu Dec 01, 2005 9:20 pm
Reply with quote

Please show an example of the input records in each file, and what you expect the output records to look like. Can input file1 have duplicates? Can input file2 have duplicates? What is the RECFM and LRECL of each file?
Back to top
View user's profile Send private message
friend

New User


Joined: 01 Dec 2005
Posts: 3

PostPosted: Fri Dec 02, 2005 1:38 pm
Reply with quote

input file 1 (I1) :
VB LRECL=37
key is made of 2 fields (absolute position given) :
pos 28 Len=4 type CH
pos 32 Len=6 type NUM

input file 2 (I2) :
VB LRECL=4100
key is made of 2 fields (absolute position given) :
pos 05 Len=4 type CH
pos 32 Len=4 type HEX

for each record of I1, I want to select all corresponding records of I2

I1
20051130.{ ?Gd.LOBJOISECRD000698

I2
ECRD...?.......?
CCDC000B00000205
5394002A60005002

I hope it is clear enough, thanks for helping
JFR
Back to top
View user's profile Send private message
friend

New User


Joined: 01 Dec 2005
Posts: 3

PostPosted: Fri Dec 02, 2005 1:40 pm
Reply with quote

i forgot to mention that both file are of course sorted on their key :
I1 doesn't have no duplicates
I2 can have duplicates
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Fri Dec 02, 2005 9:41 pm
Reply with quote

I can't match up the keys you describe with the input data you show. What do you mean by NUM (ZD? Something else)? What do you mean by HEX (BI? Something else?).

This will probably go faster for both of us if you show me what the actual data in the first few records of each file looks like, so run this job and post the OUT1 and OUT2 output, or send it to me offline (yaeger@us.ibm.com):

Code:

//S1    EXEC  PGM=ICETOOL                 
//TOOLMSG DD SYSOUT=*                     
//DFSMSG DD SYSOUT=*                       
//IN1 DD DSN=...  input file1 (VB/37)       
//IN2 DD DSN=...  input file2 (VB/4100)       
//OUT1 DD SYSOUT=*                         
//OUT2 DD SYSOUT=*                         
//TOOLIN DD *                             
COPY FROM(IN1) TO(OUT1) USING(CTL1)       
COPY FROM(IN2) TO(OUT2) USING(CTL1)       
/*                                         
//CTL1CNTL DD *                           
   OPTION STOPAFT=3                         
   OUTREC FIELDS=(1,4,1,4,HEX,5,HEX)       
/*


Also, you say the second key in file1 has a different length and format than the second key in file2 (6,NUM vs 4,HEX), so it's unclear how you would want to compare them. Please explain (preferably with examples).
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 Store the data for fixed length COBOL Programming 1
No new posts Populate last day of the Month in MMD... SYNCSORT 2
No new posts Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
No new posts Data set Rec-Cnt and Byte-Cnt Testing & Performance 2
No new posts SCOPE PENDING option -check data DB2 2
Search our Forums:

Back to Top