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

Conversion of all the strings from a particular point


IBM Mainframe Forums -> TSO/ISPF
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Sikkandhar

New User


Joined: 03 Dec 2007
Posts: 61
Location: Bangalore

PostPosted: Fri Feb 13, 2009 7:55 pm
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

Global Moderator


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

PostPosted: Fri Feb 13, 2009 8:08 pm
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: 61
Location: Bangalore

PostPosted: Mon Feb 16, 2009 1:53 pm
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

Superior Member


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

PostPosted: Mon Feb 16, 2009 2:09 pm
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: 61
Location: Bangalore

PostPosted: Mon Feb 16, 2009 2:11 pm
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

Superior Member


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

PostPosted: Mon Feb 16, 2009 2:19 pm
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: 61
Location: Bangalore

PostPosted: Mon Feb 16, 2009 2:23 pm
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

Superior Member


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

PostPosted: Mon Feb 16, 2009 2:32 pm
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: 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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> TSO/ISPF

 


Similar Topics
Topic Forum Replies
No new posts Point and Shoot )PTNS TSO/ISPF 0
No new posts 10 byte RBA conversion DB2 2
No new posts 10 byte RBA conversion -non applicati... JCL & VSAM 1
No new posts file manager is doing string conversion IBM Tools 3
No new posts A directory in the pathname was not f... ABENDS & Debugging 0
Search our Forums:

Back to Top