Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Conversion of all the strings from a particular point

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF
View previous topic :: :: View next topic  
Author Message
Sikkandhar

New User


Joined: 03 Dec 2007
Posts: 58
Location: Bangalore

PostPosted: Fri Feb 13, 2009 7:55 pm    Post subject: Conversion of all the strings from a particular point
Reply with quote

Hi,

I would like to know how to convert all the occurences of a particular string from a particular point in a COBOL program. For example, a string "Variable1" is there in a cobol program. I would like to convert this string "Variable1" to "Var1" after Data Division.
Occurences before Data Division should be ignored

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

superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4648
Location: Raleigh, NC, USA

PostPosted: Fri Feb 13, 2009 8:08 pm    Post subject: Reply to: Conversion of all the strings from a particular po
Reply with quote

Using the ISPF Editor, can't you just exclude the lines up to the end of the DATA DIVISION, then use the change command C 'Variable1' 'Var1' NX ALL?

Or, if you were to use a regular TSO/E EDIT, if you were to use the FIND command to locate the point in the data where you want to start, then any command you issue is from that point forward, i.e. C * 999999 /Variable1/Var1/ is going to be done from the current row pointer forward.
Back to top
View user's profile Send private message
Sikkandhar

New User


Joined: 03 Dec 2007
Posts: 58
Location: Bangalore

PostPosted: Mon Feb 16, 2009 1:53 pm    Post subject: Reply to: Conversion of all the strings from a particular po
Reply with quote

Thanks Superk

But if i use "C 'Variable1' 'Var1' NX ALL", all the occurrences are getting converted.
And "C * 999999 /Variable1/Var1/" converts the the variable Variable on the current line to "999999/Variable/Var1"

Currently i use this command to get the line number where Data Division starts

"ISREDIT F ALL 'DATA DIVISION' "
LINA=""
ADDRESS ISREDIT "(LINA) = LINENUM .ZCSR"

I would like to change the occurence of Variable1 to Var1 after this line number
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Mon Feb 16, 2009 2:09 pm    Post subject:
Reply with quote

Hi,

You might "label" the COBOL code after Data Division as ".A .. .B" then
Code:
C ALL "VAR1" "VAR2" .A .B
. Try this in view mode or on some other (back-up) DSN - if satisfied with the end results, proceed.
Back to top
View user's profile Send private message
Sikkandhar

New User


Joined: 03 Dec 2007
Posts: 58
Location: Bangalore

PostPosted: Mon Feb 16, 2009 2:11 pm    Post subject:
Reply with quote

Thanks Anuj.
Can you please get me syntax for labelling a line or link for TSO/ISPF commands
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Mon Feb 16, 2009 2:19 pm    Post subject:
Reply with quote

Hi,

Just an example:
Code:
000003 //*                                                             
.A     //**************************************************************
000005 //JS001    EXEC UCC11RMS,PARM=F                                 
000006 //**************************************************************
000007 //*                                                             
000008 // SET YDATE=D080808                                             
.B     //*                                                             
000010 //EMAIL    EXEC PGM=IKJEFT01,REGION=0M,PARM='%MYEXEC &YDATE'     
Check the position of ".A" & ".B" (placed in line numbers, on left side of the code), they are labels.
Back to top
View user's profile Send private message
Sikkandhar

New User


Joined: 03 Dec 2007
Posts: 58
Location: Bangalore

PostPosted: Mon Feb 16, 2009 2:23 pm    Post subject:
Reply with quote

I have to label a program through a mAcro in Rexx and then have to change the occurence of the variable from that point through REXX
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Mon Feb 16, 2009 2:32 pm    Post subject:
Reply with quote

oh..you ball me out, I don't speak REXX much and thread being in TSO/ISPF part of the forum (instead of being in CLIST/REXX part of the frorm) made me to suggest about labels.

For Label thing you might look at this thread: http://ibmmainframes.com/viewtopic.php?t=9123&highlight=label
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 -> TSO/ISPF All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm
No new posts Conversion of a VB file to FB. isssal DFSORT/ICETOOL 1 Mon Oct 31, 2016 10:23 pm
No new posts EBCDIC to ASCII conversion using OCOPY mistah kurtz All Other Mainframe Topics 5 Tue Sep 06, 2016 2:26 pm
No new posts Comparex utility to Syncsort conversion mistah kurtz SYNCSORT 11 Fri Jul 22, 2016 1:53 pm
No new posts changing z/os unicode conversion service meykh2014 All Other Mainframe Topics 0 Tue Jul 12, 2016 10:49 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us