ISREDIT macro not getting called from rexx exec



IBM's Command List programming language & Restructured Extended Executor

Re: ISREDIT macro not getting called from rexx exec

Postby Pedro » Tue Sep 30, 2014 9:24 pm

I question the use of the NOT in "\= 'OK'" and I also question the scope of its result.
Pedro Vera
User avatar
Pedro
 
Posts: 569
Joined: Thu Jul 31, 2008 9:59 pm
Location: Silicon Valley
Has thanked: 0 time
Been thanked: 39 times

Re: Re: ISREDIT macro not getting called from rexx exec

 

Re: ISREDIT macro not getting called from rexx exec

Postby enrico-sorichetti » Wed Oct 01, 2014 1:37 am

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 !
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 2643
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 130 times

Re: ISREDIT macro not getting called from rexx exec

Postby prino » Wed Oct 01, 2014 2:55 am

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.
Robert AH Prins
robert.ah.prins @ the.17+Gb.Google thingy
User avatar
prino
 
Posts: 536
Joined: Wed Mar 11, 2009 12:22 am
Location: Oostende, Belgium
Has thanked: 3 times
Been thanked: 21 times

Re: ISREDIT macro not getting called from rexx exec

Postby Pedro » Wed Oct 01, 2014 5:25 am

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'
Pedro Vera
User avatar
Pedro
 
Posts: 569
Joined: Thu Jul 31, 2008 9:59 pm
Location: Silicon Valley
Has thanked: 0 time
Been thanked: 39 times

Re: ISREDIT macro not getting called from rexx exec

Postby sumitmishra » Thu Oct 02, 2014 11:02 am

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
sumitmishra
 
Posts: 7
Joined: Fri Sep 26, 2014 7:02 pm
Has thanked: 0 time
Been thanked: 0 time

Re: ISREDIT macro not getting called from rexx exec

Postby enrico-sorichetti » Thu Oct 02, 2014 11:59 am

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
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 2643
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 130 times

Re: ISREDIT macro not getting called from rexx exec

Postby Pedro » Thu Oct 02, 2014 3:27 pm

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.
Pedro Vera
User avatar
Pedro
 
Posts: 569
Joined: Thu Jul 31, 2008 9:59 pm
Location: Silicon Valley
Has thanked: 0 time
Been thanked: 39 times

Re: ISREDIT macro not getting called from rexx exec

Postby Terry Heinze » Thu Oct 02, 2014 7:08 pm

sumitmishra,
Please use the Code tags for better readability.
.... Terry
Terry Heinze
 
Posts: 193
Joined: Wed Dec 04, 2013 11:08 pm
Location: Richfield, MN, USA
Has thanked: 10 times
Been thanked: 11 times

Re: ISREDIT macro not getting called from rexx exec

Postby sumitmishra » Mon Oct 06, 2014 8:37 pm

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!
sumitmishra
 
Posts: 7
Joined: Fri Sep 26, 2014 7:02 pm
Has thanked: 0 time
Been thanked: 0 time

Re: ISREDIT macro not getting called from rexx exec

Postby enrico-sorichetti » Mon Oct 06, 2014 10:47 pm

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
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 2643
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 130 times

Previous

Return to CLIST & REXX

 


  • Related topics
    Replies
    Views
    Last post