Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search Memberlist Usergroups Profile Log in to check your private messages Log in
 
ISPF macro - Changing only non excluded lines

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF
Author Message
chidams78
Currently Banned

Active User


Joined: 29 May 2006
Posts: 59
Location: India

PostPosted: Thu Aug 21, 2008 9:52 pm    Post subject: ISPF macro - Changing only non excluded lines
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
References
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 3383
Location: Charlotte,NC USA

PostPosted: Thu Aug 21, 2008 9:54 pm    Post subject: Reply to: ISPF macro - Changing only non excluded lines
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

Senior Member


Joined: 01 Sep 2006
Posts: 635
Location: work

PostPosted: Thu Aug 21, 2008 10:00 pm    Post subject: Reply to: ISPF macro - Changing only non excluded lines
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

Active User


Joined: 29 May 2006
Posts: 59
Location: India

PostPosted: Thu Aug 21, 2008 10:00 pm    Post subject:
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

Active User


Joined: 29 May 2006
Posts: 59
Location: India

PostPosted: Fri Aug 22, 2008 9:21 pm    Post subject:
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

Senior Member


Joined: 06 Jun 2008
Posts: 1182
Location: Atlanta, GA

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

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

Active User


Joined: 29 May 2006
Posts: 59
Location: India

PostPosted: Sat Aug 23, 2008 1:22 am    Post subject:
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

Senior Member


Joined: 20 Oct 2006
Posts: 1673
Location: germany

PostPosted: Sat Aug 23, 2008 4:04 am    Post subject:
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

Active User


Joined: 29 May 2006
Posts: 59
Location: India

PostPosted: Mon Aug 25, 2008 9:20 pm    Post subject:
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
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF All times are GMT + 6 Hours
Page 1 of 1