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

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

 


Similar Topics
Topic Forum Replies
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Pulling a fixed number of records fro... DB2 2
No new posts JCL sort card - get first day and las... JCL & VSAM 9
No new posts Sort First/last record of a subset th... DFSORT/ICETOOL 7
Search our Forums:

Back to Top