|
View previous topic :: View next topic
|
| Author |
Message |
RazVorox
New User
Joined: 19 Oct 2022 Posts: 32 Location: Israel
|
|
|
|
Hi all.
I have a basic rexx prog. lets call it prog01.
prog01 calls a basic panel. lets call it panel01.
in panel01, I have (lets say) 3 options - a, b, and c.
lets say I also have 3 basic rexx programs, progA, progB, progC.
and of-course, if i choose a, i want to call progA,
if I choose b, call progB etc..
The catch is, and what i can't figure out how to do,
is to call it DIRECTLY from the panel.
I want to call a REXX program, code, from a PANEL.
Not the code "behind" it (a.k.a. - prog01),
but DIRECTLY from the actual PANEL code.
How do I go about doing it?
Would appreciate any help,
Thanks. |
|
| Back to top |
|
 |
enrico-sorichetti
Superior Member

Joined: 14 Mar 2007 Posts: 10900 Location: italy
|
|
| Back to top |
|
 |
RazVorox
New User
Joined: 19 Oct 2022 Posts: 32 Location: Israel
|
|
|
|
As usual, even though your search skills are implacable, and your links are more than a blessed go-to, I was hopping for a more concise, specific answer. perhaps even a code line (god-forbid).
The option of re-taking, or re-visiting my old REXX course, even though a general good idea, would be less than productive atm.
So, while i DO thank you, you have not really answered my question, and more like.. sent me to google it.
A thing I could, and did - myself.
Z/OS is a dying community, and part of the reason is the lack of ppl sharing direct, relevant info. like on stackOverFlow, or our newest member - ChatGPT.
If you could help with a direct reference, or code line, or example - I would appreciate it. Otherwise.. The manual, I could skim myself in the next few days. |
|
| Back to top |
|
 |
Willy Jensen
Active Member

Joined: 01 Sep 2015 Posts: 772 Location: Denmark
|
|
|
|
Sounds like you are looking for a selection panel.
Short sample:
| Code: |
)Attr
_ type(input ) color(turq ) caps(on) hilite(uscore)
] type(output) color(blue ) caps(on)
" type(text ) color(blue )
+ type(text ) color(green)
# type(text ) color(yellow) caps(off)
)Body expand(\\)
"\ \Select pgm A-C\ \+
%ISPFcmd ==>_zcmd \ \+ +
+
+
+_z+Enter selection
%1+program a
%2+program b
%3+program c
+
)Init
.zvars = '(sel1)'
)Proc
&zsel = Trans(&sel1 1,'Cmd(ZPgmA)'
2,'Cmd(ZPgmB)'
3,'Cmd(ZPgmC)'
*,?)
)End |
|
|
| Back to top |
|
 |
Willy Jensen
Active Member

Joined: 01 Sep 2015 Posts: 772 Location: Denmark
|
|
|
|
| Forgot to mention that a selection panel is started by the SELECT service, i.e. address ispexec "select panel(mypan1)" |
|
| Back to top |
|
 |
sergeyken
Senior Member

Joined: 29 Apr 2008 Posts: 2264 Location: USA
|
|
|
|
| RazVorox wrote: |
As usual, even though your search skills are implacable, and your links are more than a blessed go-to, I was hopping for a more concise, specific answer. perhaps even a code line (god-forbid).
The option of re-taking, or re-visiting my old REXX course, even though a general good idea, would be less than productive atm.
So, while i DO thank you, you have not really answered my question, and more like.. sent me to google it.
A thing I could, and did - myself.
Z/OS is a dying community, and part of the reason is the lack of ppl sharing direct, relevant info. like on stackOverFlow, or our newest member - ChatGPT.
If you could help with a direct reference, or code line, or example - I would appreciate it. Otherwise.. The manual, I could skim myself in the next few days. |
Extremely rude response, and consists of stupid mantras of young newbie-geeks…
Sorry… |
|
| Back to top |
|
 |
RazVorox
New User
Joined: 19 Oct 2022 Posts: 32 Location: Israel
|
|
|
|
First of all - Willy - Thanks.
That's -EXACTLY- what I meant, and - more specifically -, the part that I was missing was the "&zsel trans" part.
Thanks for the bullet :-)
Second - about "Rude".
Rude is not a "young" or "newbie" factor.
It's a human factor.
Having the knowledge and seniority does NOT justify attitude, bad manners, intonation, or general unpleasant conduct.
Again - this is meant as a place to share knowledge and help. not to bully, be condescending, or otherwise unpleasant or ego-trips. showing up over and over, calling everyone stupid, and sending them to a 300 page book, does not make you "smart". nor pleasant. nor humble.
You can help, without demeaning others, or the attitude.
This is not his first reply to me, or others, in that manner.
I am a senior, with over a decade in the open, I have done some pretty amazing stuff, and if you are looking for a "newbie" child to ego trip over... well.. That's not going to pass with me.
Sometimes, if you don't have anything to contribute, or nice to say, maybe you just shouldn't say anything.
Optional response the WOULD help, but also make me WORK for it, i.e., would be - "Look at the Selection panels again". or.. "Did you remember the &zsel = trans part" or any one out of a dozen other options.
"BTW... you do not call a panel, you DISPLAY it
and here the link to the list of ISPF manuals"
is the equivalent of saying - I know, you don't, go rtfm.
Thank you. I have done my summer semester on rexx.
Other wise I wouldn't be here.
That is not helping. that is sending me to @$@%.
so.. no. not RUDE. calling someone out on misconduct is standing up for yourself. you are looking for rude? - respect is to be earned. not forced upon. |
|
| Back to top |
|
 |
Pedro
Global Moderator

Joined: 01 Sep 2006 Posts: 2624 Location: Silicon Valley
|
|
|
|
| update: when I posted this, I was thinking of a compiled program,
| then realized the original post was about rexx. Use CMD() for rexx
| programs.
re:
| Code: |
&zsel = Trans(&sel1 1,'Cmd(ZPgmA)'
2,'Cmd(ZPgmB)'
3,'Cmd(ZPgmC)' |
It should be noted that programs called use the CMD() option are expecting the parameter list to be in a specific format. And, even though they are programs, they are more commonly referred to as TSO commands.
To call a batch program, use the PGM() option:
| Code: |
&zsel = Trans(&sel1 1,'PGM(ZPgmA)'
2,'PGM(ZPgmB)'
3,'PGM(ZPgmC)' |
The difference is subtle, so maybe you will not notice that there is a difference. The format of the parameter list is different. |
|
| Back to top |
|
 |
RazVorox
New User
Joined: 19 Oct 2022 Posts: 32 Location: Israel
|
|
|
|
Thanks! Never thought of trying the tso option directly!!
It definitely opens up some new avenues..
I'll play around with it, see how it goes!!
(Eventualky, I'm gonna work with sup-c, so trying out
the different approaches, Code wise, between addressing
from rexx, and trying to call pgm,
Is exactly the kind of stuff i call fun :-)
Much appreciated!! ) |
|
| Back to top |
|
 |
Willy Jensen
Active Member

Joined: 01 Sep 2015 Posts: 772 Location: Denmark
|
|
|
|
You can actually run a program from a display panel, by using inline REXX, like so:
| Code: |
)Attr
_ type(input ) color(turq ) caps(on) hilite(uscore)
] type(output) color(blue )
# type(output) color(yellow)
" type(text ) color(blue )
+ type(text ) color(green)
)Body expand(\\)
"\ \Select pgm A-C\ \+
%ISPFcmd ==>_zcmd \ \+ +
#err
+
+_z+Enter selection
%1+program a
%2+program b
%3+program c
+
)Init
.zvars = '(sel1)'
)Proc
*REXX (*)
err=''
Select
when sel1='1' then Call @Echo 'A'
when sel1='2' then Call @Echo 'B'
when sel1='3' then Call @Echo 'C'
otherwise err='Bad selection'
End
*ENDREXX
)End |
Inline REXX gives you much more control over your program calls.
Major difference is that a SELECTed panel stays active till you hit END or RETURN (or enter one of those commands), while a DISPLAYed panel terminates immediately whatever you press, unless of course you have some VERIFYs in there. |
|
| Back to top |
|
 |
|
|
 |
All times are GMT + 6 Hours |
|