Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Forum Index
 
Register
 
IBM Mainframe Forum 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: 2481
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
No new posts One-One matching using SORT dearlux SYNCSORT 14 Fri Oct 11, 2019 12:11 am
No new posts DFSMShsm Dataset Recovery with B and ... Joerg.Findeisen JCL & VSAM 0 Sat Oct 05, 2019 10:01 pm
No new posts Create Dynamic Sort card with Omit co... balaji81_k DFSORT/ICETOOL 9 Thu Sep 26, 2019 10:06 pm
No new posts Duplicating records in a PDS memebr/I... imcoolleo COBOL Programming 5 Mon Sep 16, 2019 3:32 pm
No new posts Compare duplicate records in same file pshongal DFSORT/ICETOOL 3 Fri Aug 09, 2019 9:37 am

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