Page 2 of 2

Re: ISREDIT macro not getting called from rexx exec

PostPosted: Tue Sep 30, 2014 9:24 pm
by Pedro
I question the use of the NOT in "\= 'OK'" and I also question the scope of its result.

Re: ISREDIT macro not getting called from rexx exec

PostPosted: Wed Oct 01, 2014 1:37 am
by enrico-sorichetti
I question the use of the NOT in "\= 'OK'"


the REXX reference manual does not question it :mrgreen:

http://publibz.boulder.ibm.com/cgi-bin/ ... 0253&CASE=
not the latest one but more than enough

anyway quite a few characters depend heavily on the CODEPAGEs used ant the 3270 emulator configuration
see for example { } [ ] ^ ¬ | and the vertical broken bar

on some systems I worked on the or and the concatenation operators were the !

Re: ISREDIT macro not getting called from rexx exec

PostPosted: Wed Oct 01, 2014 2:55 am
by prino
Pedro wrote:I question the use of the NOT in "\= 'OK'" and I also question the scope of its result.

Scope is a problem, or the TS has missed a DO while cutting and pasting.

Re: ISREDIT macro not getting called from rexx exec

PostPosted: Wed Oct 01, 2014 5:25 am
by Pedro
IF SYSDSN(MDSN) \= "OK" THEN


I was not challenging the syntax. I was challenging the logic. This is the way I understand the current statement:
If the data set does NOT exist, then process the members.


I think it should be:
If the data set does exist, then process the members.

The poster should test for = 'OK'

Re: ISREDIT macro not getting called from rexx exec

PostPosted: Thu Oct 02, 2014 11:02 am
by sumitmishra
Hi,

I have noticed one thing, when I put display in my rexx exec and macro (IM001) as mentioned below:

/*REXX*/
ISREDIT "MACRO PROCESS"
TRACE OFF
"ISREDIT (USTAT) = USER_STATE"
/*"ISPEXEC VGET (ENDEXEC) SHARED"*/
"ISPEXEC VGET (INPUT1) SHARED"
SAY "MACRO INPUT1 :" INPUT1
"ISPEXEC VGET (INPUT2) SHARED"
SAY "MACRO INPUT2 :" INPUT2

Below is the message I got after execution:

INPUT1 : ABC,
INPUT2 : EFG,
MDSN : xxxxxx.TEST.MYUTIL,
XXXXXX.TEST.MYUTIL,
,
TOTAL 3 MEMBERS OF XXXXXX.TEST.MYUTIL TO BE PROCESSED..........,
MEMBERS STATUS,
MACRO INPUT1 :,
MACRO INPUT2 : EFG,
MACRO MDSN : XXXXXX.TEST.MYUTIL,
TEST1 PROCESSED SUCCESSFULLY,
MACRO INPUT1 :,
MACRO INPUT2 : EFG,
MACRO MDSN : XXXXXX.TEST.MYUTIL,
TEST2 PROCESSED SUCCESSFULLY,
MACRO INPUT1 :,
MACRO INPUT2 : EFG,
MACRO MDSN : XXXXXX.TEST.MYUTIL,
TEST3 PROCESSED SUCCESSFULLY,
***,
\
Input 1 is coming as empty inside the macro where as INput2 and MDSN values are coming as expected.. I think this is the reason why it is not working. I think there is some thing missing in my macro. Can some one please advise me?

Thanks

Re: ISREDIT macro not getting called from rexx exec

PostPosted: Thu Oct 02, 2014 11:59 am
by enrico-sorichetti
see here for a working example of a mass change rexx script
http://ibmmainframes.com/about60794.html
driver and inner macro

or here for a more general one
driver and sample inner macros
http://ibmmainframes.com/about25947.html

Re: ISREDIT macro not getting called from rexx exec

PostPosted: Thu Oct 02, 2014 3:27 pm
by Pedro
Did you ever fix this:
IF SYSDSN(MDSN) \= "OK" THEN
   "ISPEXEC VPUT (INPUT1) SHARED"


1. The IF statement is not true, so this first VPUT is not getting executed. And that is why when the macro does a VGET, there is nothing there.

2. To fix it, you should remove the '\' sign so that is it true.

3. The scope of the IF statement should apply all of your processing. You need a DO statement after the IF statement. And you need an END statement near the end. You should notice that the indentations in your existing DO and END do not match.

Re: ISREDIT macro not getting called from rexx exec

PostPosted: Thu Oct 02, 2014 7:08 pm
by Terry Heinze
sumitmishra,
Please use the Code tags for better readability.

Re: ISREDIT macro not getting called from rexx exec

PostPosted: Mon Oct 06, 2014 8:37 pm
by sumitmishra
Thanks Pedro and every one for helping me out! The code is behaving in an expected manner now. The next goal I set for myself is to use panels and take inputs from it, but I won't bother you much on this. :)

Thanks!

Re: ISREDIT macro not getting called from rexx exec

PostPosted: Mon Oct 06, 2014 10:47 pm
by enrico-sorichetti
The next goal I set for myself is to use panels and take inputs from it, but I won't bother you much on this.

since You will have a working example in my links