IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How to display data in command prompt


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
shivadravid

New User


Joined: 16 Jan 2014
Posts: 2
Location: India

PostPosted: Sun Jan 19, 2014 10:27 am
Reply with quote

I have a requirement in REXX which is similar to RETP command in that when the REXX is called it will display a popup panel with list of commands as options and the user selects the desired option and the popup closes and the selected option is displayed in the command line, I did the coding till user selects the option and stored the selected option in a variable once the popup panel closes,now i want to display this variable in command line as RETP does, Any help is appreciated!!!!
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2455
Location: Hampshire, UK

PostPosted: Mon Jan 20, 2014 4:52 am
Reply with quote

You should not post the same topic on multiple forums. Which topic do you want locked/deleted? This one or the one on 'another' forum?
Back to top
View user's profile Send private message
sureshpathi10

Active User


Joined: 03 May 2010
Posts: 154
Location: Kuala Lumpur

PostPosted: Mon Jan 20, 2014 7:47 am
Reply with quote

Hi Shiva,

Have you try to assign value to "ZCMD" system variable?
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2455
Location: Hampshire, UK

PostPosted: Mon Jan 20, 2014 7:01 pm
Reply with quote

Quote:
Have you try to assign value to "ZCMD" system variable?

I suggested that on the other forum - one of the reasons for not posting across forums - wastes everybody's time.
I then tried it myself - it does not work. I guess zcmd get initialized on redisplay of the panel. And for what he wants a selection from a menu panel would be far more appropriate, standard, understandable and reasonable.
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2455
Location: Hampshire, UK

PostPosted: Mon Jan 20, 2014 8:09 pm
Reply with quote

Update: having got back to work after lunch I did a little experimtent and you can assign a value to ZCMD and have it displayed. My original test was using an existing panel and that was initialising ZCMD in the INIT section. However, pressing enter did not get the error that I was expecting (unknown command) but continued processing the rexx program that displayed the panel. Experiments continue.
Back to top
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2547
Location: Silicon Valley

PostPosted: Mon Jan 20, 2014 8:12 pm
Reply with quote

You did not say from where you are executing your rexx program from. My experience is that you will need code within the calling panel.

1. in the exec, VPUT myvar SHARED
2. in the )INIT section of the panel:
Code:
  VGET myvar SHARED
  IF (&myvar &= &z)
      &ZCMD = &myvar
Back to top
View user's profile Send private message
shivadravid

New User


Joined: 16 Jan 2014
Posts: 2
Location: India

PostPosted: Mon Jan 20, 2014 8:42 pm
Reply with quote

Nic,
Sorry for the redundancy caused, i used ur menu suggestion and it worked as expected, but still i want to know whether we will be able to return a value to the command line from rexx

Thanks again for ur valuable suggestions!!!
Back to top
View user's profile Send private message
sureshpathi10

Active User


Joined: 03 May 2010
Posts: 154
Location: Kuala Lumpur

PostPosted: Tue Jan 21, 2014 7:39 am
Reply with quote

Yes Mr. Shiva,

ZCMD is available in your REXX program also, only if you use VGET & VPUT in your panel.
So, if you perform as Mr. Pedro suggested, you will get it done.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts How to save SYSLOG as text data via P... All Other Mainframe Topics 1
No new posts Store the data for fixed length COBOL Programming 1
No new posts RACF - Rebuild SETROPTS command which... All Other Mainframe Topics 3
No new posts Routing command Address SDSF to other... TSO/ISPF 2
No new posts Data set Rec-Cnt and Byte-Cnt Testing & Performance 2
Search our Forums:

Back to Top