Call REXX dsn "independently" from ispf panel



IBM's Command List programming language & Restructured Extended Executor

Call REXX dsn "independently" from ispf panel

Postby RazVorox » Wed Jun 07, 2023 11:32 am

Hi all.
OK, this one is a question of lack of basic understanding,
so a kick in the arse with an RTFM is more than welcomed.
just.. link/point me to the correct RTFM. please.

What i want:
- I have a panel.
- I have a dsn. lets say - 'username.location.sample(rexxcode)'

What i want:
- in the panel, to put

    *REXX(*)
      CALL username.location.sample(rexxcode)
    *ENDREXX
 


now, I realize that i need to some how tell rexx about the path,
and I'm notsure if i can insert dd statements "post-call" using "address" INSIDE the panel,
or if even the actuall "call" will work.
(I mean, ispf is up, coz.. panels, so IKJEFT01 is running.. but..)

I could, and i already did - handle it nicely outside, in the "main" rexx that takes care of the panel etc.
so code-wise, and delivery-wise - I'm ok.
(Thanks to you guys btw, and helps in prev posts :-) )

This is one of those theoretical nagging questions.
The lack of knowledge and understanding is eating at me.

My end goal is to have a snippet, that i could "embed" in the panel,
to call an "independent", external rexx (dsn).

(Perhaps link-edit? like, compile the rexx and run it as exec?
but i would still have to explain the path ~thinking emoji~)

Anyways, I don't know what to think, so.. here it is. a post.
RazVorox
 
Posts: 16
Joined: Wed Oct 19, 2022 11:52 am
Has thanked: 7 times
Been thanked: 1 time

Re: Call REXX dsn "independently" from ispf panel

Postby willy jensen » Wed Jun 07, 2023 1:01 pm

For starters you must use the EXEC command and not the CALL command to run an external REXX like that, I here assume that it is a normal REXX pgm and not a load module.
So the syntax would be Address TSO "EX 'dataset.name(member)'", make the dsname fully qualified and quoted, just in case.
When you say you want a path to the REXX pgm I then assume that it is because you want to be able to run the REXX by name without specifying the datasetname too, which would be the the thing to do if the REXX calls external subroutines in the same dataset. In that case you must allocate the library using the ALTLIB command, and release it again afterward i.e.
 Address TSO "Altlib act appl(exec) da('dataset.name') uncond"
 cc=RexxPgm(parms)
 or you could use the REXX CALL here like CALL REXPGM 'parms'
 Address TSO "Altlib deact appl(exec)"

The TSO commands ALTLIB, CALL and EXEC commands are all described in the 'TSO/E Command Reference' manual, the REXX CALL command is described in the 'TSO/E REXX Reference' manual.

These users thanked the author willy jensen for the post:
RazVorox (Sun Jun 11, 2023 4:38 pm)
willy jensen
 
Posts: 467
Joined: Thu Mar 10, 2016 5:03 pm
Has thanked: 0 time
Been thanked: 70 times

Re: Call REXX dsn "independently" from ispf panel

Postby willy jensen » Wed Jun 07, 2023 1:23 pm

Also, an often overlooked fact is that most TSO commands are documented in HELP, so you can do command TSO HELP ALTLIB from any ISPF panel.

These users thanked the author willy jensen for the post:
RazVorox (Sun Jun 11, 2023 4:38 pm)
willy jensen
 
Posts: 467
Joined: Thu Mar 10, 2016 5:03 pm
Has thanked: 0 time
Been thanked: 70 times


Return to CLIST & REXX

 


  • Related topics
    Replies
    Views
    Last post