IBM Mainframe Forum Index
 
Register
 
IBM Mainframe Forum Index Mainframe: Search Log in to check your private messages Log in
 

Joining 2 records to 1 using Sort


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

New User


Joined: 14 Sep 2007
Posts: 1
Location: Waterloo, Ontario

PostPosted: Sat Dec 08, 2018 8:53 am
Reply with quote

Hi there. I was doing some searching through the board but couldn't get anything working properly for me. I found a similar thread and it is near what I am looking for but unfortunately I'm getting "odd" results. Plus I haven't used DFSORT in a long time though...

My inputs are both 80 bytes (they are control cards) and my output is still 80 bytes. and in fact, my input data is only 31 bytes of data so I am trying to "combine" 2 records into 1

Input File - LRECL 80
Code:

DDDDDD  XXXXXXX  0263 0264 0261
DLLLL   XXXXXXX  0385 0376 0375


Output file should be:
Code:
DDDDDD  XXXXXXX  0263 0264 0261 DLLLL   XXXXXXX  0385 0376 0375


I am using this:
Code:
 OPTION COPY                                                 
 INREC IFTHEN=(WHEN=GROUP,RECORDS=2,PUSH=(41:1,40,41:SEQ=1))
 OUTFIL FNAMES=OUT,INCLUDE=(41,1,ZD,EQ,2),                   
     BUILD=(41,40,1,40)                                     


Output produced:
Code:
2LP01P  SLP1173  0263 0264 0261         DLPZ5   SLP1173  0385 0376 0375


The very odd thing is that I am getting the number "2" added to the beginning of the output record!?!? I think the spacing is "ok" and can work with it, but the "2" at the beginning is killing me?
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Sat Dec 08, 2018 11:40 am
Reply with quote

cmuncan


You are PUSHing the SEQence and also the record-1 data at position 41. The position 41 of your SEQeunce should be changed to 81 so that it won't overlap with the data as already suggested in your other topic.
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

 

Search our Forum:

Similar Topics
Topic Forum Replies
No new posts Inserting records into the empty segm... IMS DB/DC 0
No new posts COBOL VS SORT Utility for file format... COBOL Programming 6
No new posts Need assistance formatting when joini... SYNCSORT 8
No new posts Copying data from prev record using SORT SYNCSORT 19
No new posts Combining more 4 files with sorted or... DFSORT/ICETOOL 3

Back to Top