View previous topic :: View next topic
|
Author |
Message |
rajesh_m
New User
Joined: 15 Apr 2008 Posts: 39 Location: India
|
|
|
|
Hi All,
By using ISREDIT MACRO i have replaced with one string to another. Is there any possibilty to know how many replacements are done .
For example -> c all 'str1' 'str2'
I want to know how many replacements are done. |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
CHANGE_COUNTS—Query Change Counts
The CHANGE_COUNTS assignment statement retrieves values set by the most recently processed CHANGE command and places these values in variables.
Syntax Assignment statement syntax
ISREDIT (var1,var2) = CHANGE_COUNTS
var1 The name of a variable to contain the number of strings changed. It must be an 8-character value that is left-padded with zeros.
var2 The name of a variable to contain the number of strings that could not be changed. It also must be an 8-character value that is left-padded with zeros.
Return codes
0 Normal completion
20 Severe error
Examples:
To put the number of changes resulting from the most recent CHANGE command into the variable &CHGED:
ISREDIT (CHGED) = CHANGE_COUNTS
To put the number of change errors into variable &ERRS:
ISREDIT (,ERRS) = CHANGE_COUNTS
To put the number of changes and change errors into variables &CHG and &ERR:
ISREDIT (CHG,ERR) = CHANGE_COUNTS
SC34-4820-05 Edit and Edit Macros z/OS Version 1 Release 8.0 |
|
Back to top |
|
|
rajesh_m
New User
Joined: 15 Apr 2008 Posts: 39 Location: India
|
|
|
|
Hi dbzTHEdinosauer,
I am getting
"System abend code 0C4, reason code 00000004.
Abend in external function ISREDIT.
5 +++ ISREDIT(CHGED) = CHANGE_COUNTS "
When i tried to execute. |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
are you using trace? Is the resolution of the command correct?
Quote: |
5 +++ ISREDIT(CHGED) = CHANGE_COUNTS"
|
from what you have provided, the syntax is incorrect. only one ". |
|
Back to top |
|
|
rajesh_m
New User
Joined: 15 Apr 2008 Posts: 39 Location: India
|
|
|
|
Can you give me small example how to use
"ISREDIT(CHGED) = CHANGE_COUNTS" |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2547 Location: Silicon Valley
|
|
|
|
Code: |
Abend in external function ISREDIT.
5 +++ ISREDIT(CHGED) = CHANGE_COUNTS " |
You did not copy the example correctly. It should look something like this:
Code: |
Address ISREDIT "(CHGED) = CHANGE_COUNTS "
|
whereas, you have ISREDIT abutted with (chged) making it look like a function call. And I recommend using quotes around the macro statement so rexx does not try to resolve it. |
|
Back to top |
|
|
rajesh_m
New User
Joined: 15 Apr 2008 Posts: 39 Location: India
|
|
|
|
Thank you dbzTHEdinosauer and Pedro its worked.
Thank you very much for your response.......... |
|
Back to top |
|
|
|