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
 
Joining 2 records to 1 using Sort

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: Joining 2 records to 1 using Sort
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: 2448
Location: @my desk

PostPosted: Sat Dec 08, 2018 11:40 am    Post subject:
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    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
This topic is locked: you cannot edit posts or make replies. DFSORT output in CSV for data spans i... hiravibk DFSORT/ICETOOL 3 Tue Nov 13, 2018 7:55 pm
No new posts Writing multiple records into a CSV r... hiravibk DFSORT/ICETOOL 2 Wed Nov 07, 2018 2:35 pm
No new posts Can records in IMS/DB be related usin... SRICOBSAS IMS DB/DC 2 Fri Oct 19, 2018 3:53 pm
No new posts Need help on the multiple files refor... wik123 DFSORT/ICETOOL 7 Wed Sep 19, 2018 10:47 am
No new posts Remove selected duplicate rows from t... hnharish DFSORT/ICETOOL 3 Wed Sep 05, 2018 3:11 am

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