Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Calling Assembler from Rexx

250 views
Skip to first unread message

Thom Stone

unread,
Jan 27, 1999, 3:00:00 AM1/27/99
to
Hello,
I'm calling an assembler program from a rexx environment other than
normally discussed in this newsgroup. It is Netview. I can get my program
to work from TSO, but I need to run it from Netview and it fails there.
Here is a portion of the code.
006900 CMDSTATE:
007000 DO PTR= 1 TO JOB.0
007100 DO PTR= 1 TO 3 /* shorten loop while testing */
007200 THISJOB=JOB.PTR
007300 THISJOB=STRIP(THISJOB)
007400 IF THISJOB='X' THEN ITERATE
007500 ADDRESS MVS
007600 CALL 'SYS1.DACLIB(FINDJOB)' THISJOB
/* also tried this statement .... It works on tso.
"CALL 'SYS1.DACLIB(FINDJOB)' '"THISJOB"'"
*/
007700 SAY 'CNM306I RC='RC
007800 SAY 'CNM306I RC='RESULT
007900 IF RC/=0 THEN
008000 ITERATE
008100 ELSE
008200 SAY 'CNM305I 'THISJOB' NOT FOUND ACTIVE ON 'CPUID'.'
008300 END
008400 EXIT
Findjob is an assembler program that returns the decimal value of the asid
of the job being searched for in register 15. If it is run as a batch job
it is returned as the condition code of the job step. If called as a clist
it returns as LASTCC or MAXCC. If run as TSO REXX it comes back as RC.
When run in Netview it always comes back as 0 no matter how I call it. I
think I need to set something up correctly in order to get the return code
back in netview, but I'm stumped so far. If anyone has any ideas I'm open
to suggestions.
Thanks,
Thom Stone
tss...@usa.net
ts6...@deere.com


One Hand Clapping

unread,
Jan 27, 1999, 3:00:00 AM1/27/99
to
First of all, running the asvt and decoding the asid are do-able using rexx
alone (I can give you a Display Active exec that does this if you need it.... I
think it has also been posted to the SHARE mods tape as well). But to answer
your question, Netview is not a TSO environment, and you will probably need to
use ADDRESS LINKMVS to invoke your program. The program will need to be placed
in the steplib, joblib, lpa, or linklist. Rexx variables and return codes are
handled correctly.

Thom Stone wrote:

> Hello,
> I'm calling an assembler program from a rexx environment other than
> normally discussed in this newsgroup. It is Netview. I can get my program
> to work from TSO, but I need to run it from Netview and it fails there.

> <snip>

Thom Stone

unread,
Jan 28, 1999, 3:00:00 AM1/28/99
to
I moved the program into a dataset in STEPLIB. I also set it up as a
command in Netview. When I execute it as a command it doesn't do anything
as I would expect, but it does not come back with command not found either
so I assume it is getting called. When I try to call it as a function I get
the IRX message function is not returning data message which also makes me
believe it is being called. But I cannot pick up the return code. Of
course the program is not really returning a return code, it is just
depositing something in register 15 for someone else to use. Not being an
assembler programmer this is pretty much over my head. I'll try the ADDRESS
LINKMVS tomorrow and see what happens.
Thanks for the ideas! It gives me another approach to try.
Thom Stone

One Hand Clapping wrote in message <36AFE0E6...@cyberramp.net>...


>First of all, running the asvt and decoding the asid are do-able using rexx
>alone (I can give you a Display Active exec that does this if you need
it.... I
>think it has also been posted to the SHARE mods tape as well). But to
answer
>your question, Netview is not a TSO environment, and you will probably need
to
>use ADDRESS LINKMVS to invoke your program. The program will need to be
placed
>in the steplib, joblib, lpa, or linklist. Rexx variables and return codes
are
>handled correctly.
>

>> tss...@usa.net
>> ts6...@deere.com
>

Thom Stone

unread,
Jan 29, 1999, 3:00:00 AM1/29/99
to
Thanks for the tip, ADDRESS LINKMVS worked out well. If you have that
example I wouln't mind taking a look at it. You can send it to my e-mail
address if you like. If not I'll try to get ahold of the SHARE mods.
Thanks,
Thom Stone

One Hand Clapping wrote in message <36AFE0E6...@cyberramp.net>...
>First of all, running the asvt and decoding the asid are do-able using rexx
>alone (I can give you a Display Active exec that does this if you need
it.... I
>think it has also been posted to the SHARE mods tape as well). But to
answer
>your question, Netview is not a TSO environment, and you will probably need
to
>use ADDRESS LINKMVS to invoke your program. The program will need to be
placed
>in the steplib, joblib, lpa, or linklist. Rexx variables and return codes
are
>handled correctly.
>

>Thom Stone wrote:
>
>> Hello,
>> I'm calling an assembler program from a rexx environment other than
>> normally discussed in this newsgroup.

...........SNIP.............
>> tss...@usa.net
>> ts6...@deere.com
>

0 new messages