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
 
JCL for appending a record columnwise

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
Ranjeet.KK

New User


Joined: 30 Oct 2013
Posts: 2
Location: India

PostPosted: Thu Oct 31, 2013 12:03 am    Post subject: JCL for appending a record columnwise
Reply with quote

Hi All,

I need some help. I have a requirement as below.

My input file layout is as below.

UID ACCT_NUM ACCT_TYPE
100 A100 PRIMARY
100 A101 SECONDARY

200 A200 PRIMARY
200 A201 SECONDARY
200 A202 SECONDARY


I Want an output file with the below layout

UID PRI_ACCT_NUM SEC_ACCT_NUM
100 A100 A101
200 A200 A201
200 A200 A202


I can do this through cobol. But can someone please tell me how to do this through JCL?

Thanks,
Ranjeet
Back to top
View user's profile Send private message

Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7315

PostPosted: Thu Oct 31, 2013 2:11 am    Post subject: Reply to: JCL for appending a record columnwise
Reply with quote

By JCL you mean your SORT product?

Use IFTHEN=(WHEN=GROUP on your key (or on PRIMARY if you are happy with the integrity of the file). PUSH the value from the primary record to an extended field on all records of that group.

On OUTFIL, INCLUDE only the "SECONDARY" records, and use BUILD to create the data in the format that you want.
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1775
Location: Bloomington, IL

PostPosted: Thu Oct 31, 2013 2:16 am    Post subject:
Reply with quote

Is this a challenge in some contest, that everyone and his cat suddenly wants a solution to this problem?
Back to top
View user's profile Send private message
Ranjeet.KK

New User


Joined: 30 Oct 2013
Posts: 2
Location: India

PostPosted: Fri Nov 01, 2013 5:21 am    Post subject: Reply to: JCL for appending a record columnwise
Reply with quote

Thank you so much. I will work on this and get back.
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 -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Updating the Trailer count in variabl... satheshbabur DFSORT/ICETOOL 6 Wed Aug 30, 2017 9:49 pm
No new posts Repeat part of record multiple times Learncoholic DFSORT/ICETOOL 4 Tue Aug 29, 2017 11:33 am
No new posts Read two inputs and write into output... murali.andaluri DFSORT/ICETOOL 6 Wed Jul 26, 2017 7:35 pm
No new posts Need to write record of PS File in ex... Chandan1993 JCL & VSAM 1 Wed Jun 07, 2017 1:35 am
No new posts Adding big TEXT lines to each record ... bshkris SYNCSORT 4 Sat May 06, 2017 1:40 am

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