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

JCL for replacing code in Cobol


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Shiva Rama Krishna Pittal

New User


Joined: 20 Nov 2020
Posts: 1
Location: India

PostPosted: Fri Nov 20, 2020 6:57 pm
Reply with quote

Hi Everyone,
I need a JCL to replace a part of my code in cobol with other code. To be precise , in my cobol code there are
Code:
++INCLUDE
statements.

I have to replace them with:
Code:
**CHANGES START
**++INCLUDE xyz
   COPY xyz.
**CHANGES END

Please help me in writing a JCL. Thanks in advance.
Back to top
View user's profile Send private message
Garry Carroll

Senior Member


Joined: 08 May 2006
Posts: 1109
Location: Dublin, Ireland

PostPosted: Fri Nov 20, 2020 9:42 pm
Reply with quote

One way of doing this is to use your site's SORT utility.

(but, of source, that's a different part of the forum - not JCL)

Garry.
Back to top
View user's profile Send private message
Joerg.Findeisen

Active Member


Joined: 15 Aug 2015
Posts: 563
Location: Bamberg, Germany

PostPosted: Sat Nov 21, 2020 1:02 am
Reply with quote

FMNZ could be another approach for this. Let us know your precise FROM/TO, using code tags.
Back to top
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 2723
Location: NYC,USA

PostPosted: Sat Nov 21, 2020 5:29 am
Reply with quote

Welcome!
REXX could do this other than DFSORT . Do some research please and you would certainly get some ideas to start with.
Back to top
View user's profile Send private message
Joerg.Findeisen

Active Member


Joined: 15 Aug 2015
Posts: 563
Location: Bamberg, Germany

PostPosted: Sun Nov 22, 2020 12:50 am
Reply with quote

If it is a single line only to be replaced by multiple ones, I think what Garry has suggested will work best. Unload the Members to a PS and do the change, reload when done.
Back to top
View user's profile Send private message
sergeyken
Warnings : 2

Senior Member


Joined: 29 Apr 2008
Posts: 1139

PostPosted: Sun Nov 22, 2020 8:25 pm
Reply with quote

I would say, the JCL is the only tool out of hundreds other tools which CANNOT do this task... 353.gif 358.gif 12.gif 2020.gif
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2476
Location: Netherlands, Amstelveen

PostPosted: Mon Nov 23, 2020 2:45 pm
Reply with quote

Looking at the ++INCLUDE xyz statement I think the TS is talking about a Panvalet proprietary dataset. And that is not an IBM PDS. So processing the members to change the ++INCLUDE statements wil acquire using Panvalet utilities to extract the data to apply the changes.
Back to top
View user's profile Send private message
Garry Carroll

Senior Member


Joined: 08 May 2006
Posts: 1109
Location: Dublin, Ireland

PostPosted: Mon Nov 23, 2020 4:49 pm
Reply with quote

. not to mention the challenge around the naming of members - Panvalet allows 10-character member names.....

(had the pain of that conversion some years ago icon_sad.gif )

Garry
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 -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Cobol code- to find a string in a str... COBOL Programming 3
No new posts regarding COBOL WRITE verb (VB File H... COBOL Programming 6
No new posts COBOL Table data to a flat file with ... COBOL Programming 8
No new posts Read UTF-8 file in Cobol COBOL Programming 5
No new posts IEF085I REGION UNAVAILABLE,ERROR CODE... Java & MQSeries 0
Search our Forums:

Back to Top