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

ISPF macro - Changing only non excluded lines


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

New User


Joined: 29 May 2006
Posts: 59
Location: India

PostPosted: Thu Aug 21, 2008 9:52 pm
Reply with quote

Hi all,

Using ISREDIT macro, I just want to change the high level qualifier of a production dataset name to test name. I can do that as per below code

Code:
ISREDIT C 'PROD#P'  'TEST#T'  ALL


But how will I change all these occurances only for non excluded lines.
Basically I dont want to make a change for comments. So first i can exclude the comments using
Code:
ISREDIT EXCLUDE "//*" 1 ALL


But how will I make a change only for non excluded lines.

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

Global Moderator


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

PostPosted: Thu Aug 21, 2008 9:54 pm
Reply with quote

Didn't

ISREDIT C 'PROD#P' 'TEST#T' NX ALL

work?
Back to top
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2547
Location: Silicon Valley

PostPosted: Thu Aug 21, 2008 10:00 pm
Reply with quote

Quote:
Basically I dont want to make a change for comments.

It seems to me that the documentation (comments) would be wrong then.
Back to top
View user's profile Send private message
chidams78
Currently Banned

New User


Joined: 29 May 2006
Posts: 59
Location: India

PostPosted: Thu Aug 21, 2008 10:00 pm
Reply with quote

Earlier I had put the REXX macro code as
Code:
"ISREDIT" C 'PROD#P' 'TEST#T' "NX" ALL


But the correct one is as you had specified
Code:
"ISREDIT C 'PROD#P' 'TEST#T' NX ALL"


This one is working..Cool..thanks superk
Back to top
View user's profile Send private message
chidams78
Currently Banned

New User


Joined: 29 May 2006
Posts: 59
Location: India

PostPosted: Fri Aug 22, 2008 9:21 pm
Reply with quote

Hi all,

Is there any command to get the info from the line command region

For example, if I want to know how many lines got changed after executing the ISPF REXX macro (changing high level qualifier), I am thinking of reading the data on the left side of each impacted line(==CHG> ). Then take the occurances of it.
Could you please help me how to go for that OR is there any other logic to do that

Chidams
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Fri Aug 22, 2008 9:26 pm
Reply with quote

Code:
ISREDIT (CHGED) = CHANGE_COUNTS
Back to top
View user's profile Send private message
chidams78
Currently Banned

New User


Joined: 29 May 2006
Posts: 59
Location: India

PostPosted: Sat Aug 23, 2008 1:22 am
Reply with quote

Hi Robert,

Thanks for the command.

The above mentioned command will give the number of times the changes were put in the line.

If a single line has encountered changes for 5 times, this will give the number as 5. But I want to know how many lines got changed irrespective of the number of times, a line has undergone changes.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Sat Aug 23, 2008 4:04 am
Reply with quote

chidams78,
you have been mis-informed.

change_counts returns the
number of lines
that have been affected by the
last CHANGE command
Back to top
View user's profile Send private message
chidams78
Currently Banned

New User


Joined: 29 May 2006
Posts: 59
Location: India

PostPosted: Mon Aug 25, 2008 9:20 pm
Reply with quote

I was looking for the number of lines changed.
But what i got in the change_counts variable is the number of times the lines had undergone changes. In the below example i got change_counts as 3 (3 times the single line got changed) instead of 1.

Eg: I had 20 lines in the PROC and my macro will change the prod qualifiers to test qualifiers for the datasets and its properties.

Before change
//SORTOUT DD DSN=PRD#PP.PRDFLE.FILE,DISP=(,CATLG,DELETE),

After change
//SORTOUT DD DSN=TST#TT.TESTFLE.AUG23,DISP=(,CATLG,DELETE),

PRD#PP is to be changed to TST#TT
PRDFLE --> TESTFLE
FILE --> AUG23

Plz help....
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 Looking for a little history of ISPF ... TSO/ISPF 5
No new posts Adding QMF and SPUFI to the ISPF menu DB2 20
No new posts changing defaults in db2 admin - Unlo... DB2 0
No new posts PRINTOUT macro PL/I & Assembler 0
No new posts Issue after ISPF copy to Linklist Lib... TSO/ISPF 1
Search our Forums:

Back to Top