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
 
Duplicating records in a PDS memebr/Inserting records in mem

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
imcoolleo

New User


Joined: 04 Apr 2006
Posts: 8

PostPosted: Mon Sep 16, 2019 3:32 pm    Post subject: Duplicating records in a PDS memebr/Inserting records in mem
Reply with quote

Duplicating records in a PDS memebr/Inserting records in member

Hi All,

How can we update all PDS members to duplicate some entry?

Like I have a PDS with mupltiple members like below

VIEW XXX.XXX.XXXX.WORKPDS1(MEMBER02) - 01.0
Command ===> Sc
****** ***************************** Top of Data ***************
000001 .
000002 TRANSFER ELEMENT 'ZTEST'
000003 FROM ENVIRONMENT "PRD" SYSTEM 'ZZ' SUBSYSTEM 'STD'
000004 TYPE 'RJCJCL' STAGE P
000005 OPTIONS CCID 'ADMIN' COMMENTS "ADMIN TEST" JUMP
000006 .
000007 .
000008 TRANSFER ELEMENT 'ZTEST2'
000009 FROM ENVIRONMENT "PRD" SYSTEM 'ZZ' SUBSYSTEM 'STD'
000010 TYPE 'RJCJCL' STAGE P
000011 OPTIONS CCID 'ADMIN' COMMENTS "ADMIN TEST" JUMP

I want to repeat every below entry just after it.
FROM ENVIRONMENT "PRD" SYSTEM 'ZZ' SUBSYSTEM 'STD'
TYPE 'RJCJCL' STAGE P

So that output will look like:

VIEW XXX.XXX.XXXX.WORKPDS1(MEMBER02) - 01.0
Command ===> Sc
****** ***************************** Top of Data ***************
000001 .
000002 TRANSFER ELEMENT 'ZTEST'
000003 FROM ENVIRONMENT "PRD" SYSTEM 'ZZ' SUBSYSTEM 'STD'
000004 TYPE 'RJCJCL' STAGE P
000005 FROM ENVIRONMENT "PRD" SYSTEM 'ZZ' SUBSYSTEM 'STD'
000006 TYPE 'RJCJCL' STAGE P
000007 OPTIONS CCID 'ADMIN' COMMENTS "ADMIN TEST" JUMP
000008 .
000009 .
000010 TRANSFER ELEMENT 'ZTEST2'
000011 FROM ENVIRONMENT "PRD" SYSTEM 'ZZ' SUBSYSTEM 'STD'
000012 TYPE 'RJCJCL' STAGE P
000013 FROM ENVIRONMENT "PRD" SYSTEM 'ZZ' SUBSYSTEM 'STD'
000014 TYPE 'RJCJCL' STAGE P
000015 OPTIONS CCID 'ADMIN' COMMENTS "ADMIN TEST" JUMP

Kindly suggest.
Thanks/
Back to top
View user's profile Send private message

Rohit Umarjikar

Senior Member


Joined: 21 Sep 2010
Posts: 2262
Location: NY,USA

PostPosted: Mon Sep 16, 2019 4:48 pm    Post subject:
Reply with quote

Do not post the same questions in two sections , it won’t help you to get any different answers. Second use code tags.
http://ibmmainframes.com/viewtopic.php?p=347301#347301

Moderator, Please lock this topic.
Back to top
View user's profile Send private message
imcoolleo

New User


Joined: 04 Apr 2006
Posts: 8

PostPosted: Mon Sep 16, 2019 5:40 pm    Post subject: Reply to: Duplicating records in a PDS memebr/Inserting records in mem
Reply with quote

If you will look closely questions are in different format. One is for COBOL experts and other for DFSORT experts. Don't you think they can be addressed by different groups. Look closely again.
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2230
Location: Hampshire, UK

PostPosted: Mon Sep 16, 2019 6:06 pm    Post subject: Reply to: Duplicating records in a PDS memebr/Inserting records in mem
Reply with quote

You are posting the sme question - how do I copy 2 lines after a certain line, that line appearing several times in the dataset or member.

You have been a member for 11 years so you should know that data and code should be posted using the code tags.

And I do not know why you want to make your Endevor control cards invalid.

The DFSort topic will be deleted.
Back to top
View user's profile Send private message
Rohit Umarjikar

Senior Member


Joined: 21 Sep 2010
Posts: 2262
Location: NY,USA

PostPosted: Mon Sep 16, 2019 6:06 pm    Post subject:
Reply with quote

If you get DFSORT solution then how difficult that to apply it here and if you can not then Beginners Forum is the best place to put in ?

As far COBOL solution is concerned, isn’t it straight forward to identifying such records , Save it locally and write twice and move on with next record and repeat the same until EOF?
Back to top
View user's profile Send private message
imcoolleo

New User


Joined: 04 Apr 2006
Posts: 8

PostPosted: Tue Sep 17, 2019 9:38 am    Post subject: Reply to: Duplicating records in a PDS memebr/Inserting records in mem
Reply with quote

@Nic : Sorry about the code tags, I am using this forum after a long time.
@Rohit: It worked as per your suggestion. Thanks.
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 -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts DFSMShsm Dataset Recovery with B and ... Joerg.Findeisen JCL & VSAM 0 Sat Oct 05, 2019 10:01 pm
No new posts Compare duplicate records in same file pshongal DFSORT/ICETOOL 3 Fri Aug 09, 2019 9:37 am
No new posts How to count duplicate key records co... sergeyken SYNCSORT 0 Thu Jul 25, 2019 8:03 pm
No new posts Sort records within a data block rajiv rengasamy DFSORT/ICETOOL 0 Fri Jul 12, 2019 3:25 pm
No new posts Summing records conditional statements. chillmo SYNCSORT 13 Wed May 15, 2019 2:12 am

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