Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Command variable ZCMD is not strring any value.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF
View previous topic :: :: View next topic  
Author Message
Pragati Soni

New User


Joined: 18 Jan 2008
Posts: 47
Location: India

PostPosted: Wed Jun 17, 2009 4:40 pm    Post subject: Command variable ZCMD is not strring any value.
Reply with quote

When I execute the above panel using REXX, the variable ZCMD doesn't store any value.

Code:
)PANEL KEYLIST(ISRSAB ISR)                                             
)ATTR                                                                 
  @ TYPE(TEXT) INTENS(HIGH) COLOR(GREEN) SKIP(ON)                     
  $ TYPE(INPUT) INTENS(LOW) COLOR(RED)                                 
  _ TYPE(NEF) PAD(USER) CAPS(ON)                                       
)BODY                                                                 
%----------------------QHTOOL SUBMIT PANEL----------------------------%
%COMMAND ===> _ZCMD                                                   %
@                                              EDIT JCL ===> $J@(Y/N) +
+                                                                     +
@QHTOOL PROGRAM PDS*    ===> $QHTLLOC                                @+
+(GIVE A FULLY QUALIFIED PDS NAME WITHOUT QUOTES)                     +
+                                                                     +
@MEMBER*                ===> $QHTLPGM @            @DB2 ===> $D@(Y/N) +
+(GIVE A VALID MEMBER NAME WITHOUT QUOTES)                            +
+                                                                     +
@VSAM REGION QUALIFIER* ===> $REGN     @                              +
@                                    FOR E.G.: EVBV, FNBV, SUPV.SSUP  +
+                                                                     +
@NOTE:                                                                +
@BY DEFAULT:                                                          +
@ => LOADLIB PRD.Y00XXX.LOADLIB IS ADDED WHERE XXX IS THE USERID      +
@ => OUTPUT WILL GO INTO SPOOL IN QHPRINT.                            +
@ => COMMON DATABASES CDMF, AMF, CIF AND ADF ARE ALREADY ADDED.       +
@SPECIFY EDIT JCL => Y FOR THE FOLLOWING:                             +
@FOR MORE INPUT FILES/DATABASES OR OUTPUT FILES, ADD TO QHEXEC        +
+                                                                     +
+%PRESS PF1 FOR HELP,ENTER TO SUBMIT AND PF3 OR PF12  TO EXIT         +
)INIT                                                                 
.HELP = QHTLHLP                                                       
IF (&J = ' ')                                                         
  &J = 'N'                                                             
IF (&D = ' ')                                                         
  &D = 'N'                                                             
)PROC                                                                 
VER (&J,NB,LIST,'Y','N')                                               
VER (&D,NB,LIST,'Y','N')                                               
VER (&QHTLLOC,NB)                                                     
VER (&QHTLPGM,NB)                                                     
VPUT (J QHTLLOC QHTLPGM LOADLIB REGN D) PROFILE                       
VGET (J QHTLLOC QHTLPGM LOADLIB REGN D) PROFILE                         
)END                                 


Rexx Code
Code:
/*REXX*/                                                         
/*"ISPEXEC CONTROL ERRORS RETURN"*/                             
MAIN_PANEL:                                                     
"ISPEXEC LIBDEF ISPPLIB DATASET ID('PRD.Y00XXX.QHTOOL.PANEL')"   
"ISPEXEC ADDPOP"                                                 
"ISPEXEC DISPLAY PANEL(SUBQHTL)"                                 
"ISPEXEC VGET (ZPFKEY)"                                         
"ISPEXEC VGET (ZCMD)"                                           
SAY ZCMD                                                         
IF (ZPFKEY = 'PF03' | ZPFKEY = 'PF12' | ZCMD = 'EXIT') THEN     
  DO                                                             
   EXIT                                                         
  END                                                           


Please suggest me something. Based on the value it stores I need to perform some action but the issue is it always stores spaces.

Thanks in advance.
Back to top
View user's profile Send private message

Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1226
Location: Israel

PostPosted: Wed Jun 17, 2009 5:09 pm    Post subject: Reply to: Command variable ZCMD is not strring any value.
Reply with quote

Just remove the line with VGET (ZCMD)

Why don't you use?:
Code:
VER (&QHTLLOC,NB,DSNAME)
VER (&QHTLPGM,NB,NAME)
Back to top
View user's profile Send private message
Pragati Soni

New User


Joined: 18 Jan 2008
Posts: 47
Location: India

PostPosted: Wed Jun 17, 2009 5:55 pm    Post subject: Re: Reply to: Command variable ZCMD is not strring any value
Reply with quote

Removing the line VGET (ZCMD) is not sorting out the problem. ZCMD variable is spaces further in the code

My issue is whenever I type 'EXIT' on command, it works for the first time only and if any verfication fails then if we type 'EXIT' to come out it doesn't work. PF3 works.

Also it is not giving error for invalid commands.

My requirement is if ZCMD is spaces only then a particular function like JCL submission should happen. But ZCMD is always spaces (exception if we enter the panel for the first time and write 'EXIT', only then we come out of the panel and ZCMD has "EXIT'. In all other cases we never come out) hence the jcl always gets submitted.

Please suggest.

Marso wrote:
Just remove the line with VGET (ZCMD)

Why don't you use?:
Code:
VER (&QHTLLOC,NB,DSNAME)
VER (&QHTLPGM,NB,NAME)
Back to top
View user's profile Send private message
Pedro

Senior Member


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

PostPosted: Wed Jun 17, 2009 9:30 pm    Post subject: Reply to: Command variable ZCMD is not strring any value.
Reply with quote

ISPF handles 'exit' for you. Your application will see RC=8 after the display. Check for return code 8 and exit your application.

But check ZCMD for your private commands.

If you want to check EXIT by yourself, you should call your program with SELECT with NEWAPPL parameter and create an application command table.
Back to top
View user's profile Send private message
Pragati Soni

New User


Joined: 18 Jan 2008
Posts: 47
Location: India

PostPosted: Thu Jun 18, 2009 7:37 pm    Post subject: Re: Reply to: Command variable ZCMD is not strring any value
Reply with quote

Nothing is working..

THE RC is '0' even after typring "EXIT" on Command line. Moreover 'ZCMD' is not storing any value.

icon_sad.gif


Pedro wrote:
ISPF handles 'exit' for you. Your application will see RC=8 after the display. Check for return code 8 and exit your application.

But check ZCMD for your private commands.

If you want to check EXIT by yourself, you should call your program with SELECT with NEWAPPL parameter and create an application command table.
Back to top
View user's profile Send private message
Pedro

Senior Member


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

PostPosted: Thu Jun 18, 2009 7:40 pm    Post subject: Reply to: Command variable ZCMD is not strring any value.
Reply with quote

Can you show us your new rexx program? Your original rexx program did not check the return codes.
Back to top
View user's profile Send private message
Pedro

Senior Member


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

PostPosted: Fri Jun 19, 2009 12:01 am    Post subject: Reply to: Command variable ZCMD is not strring any value.
Reply with quote

Quote:
Also it is not giving error for invalid commands.

I think you need to check your own commands and issue your own messages.


Quote:
My requirement is if ZCMD is spaces only then a particular function like JCL submission should happen. But ZCMD is always spaces (exception if we enter the panel for the first time and write 'EXIT', only then we come out of the panel and ZCMD has "EXIT'. In all other cases we never come out) hence the jcl always gets submitted.

I think you have not shown us some of your logic... no hint of job submission in your rexx program. And there is nothing 'to get out of' because there is no loop.
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4648
Location: Raleigh, NC, USA

PostPosted: Fri Jun 19, 2009 12:44 am    Post subject: Reply to: Command variable ZCMD is not strring any value.
Reply with quote

I copied that code for the panel, and ran it on my machine. I'm not seeing an issue, although I don't see where the user is prompted to enter any commands that zcmd might use. When I did enter a command, like UPDATE, it showed that zcmd DID contain the value of UPDATE.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts TSO or command line utility to genera... kishpra JCL & VSAM 3 Thu Mar 09, 2017 1:11 am
No new posts Customizing the ISPF HILITE Command Pedro TSO/ISPF 3 Fri Mar 03, 2017 11:49 pm
No new posts Writing on to GSAM variable length rohanthengal JCL & VSAM 6 Fri Mar 03, 2017 7:46 pm
No new posts Count Trailing Spaces in variable str... Virendra Shambharkar SYNCSORT 10 Thu Feb 02, 2017 12:23 pm
No new posts Fail to change physical VSAM filename... jacobdng CICS 7 Fri Jan 20, 2017 12:36 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us