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

How to receive and pass from panel to pgm


IBM Mainframe Forums -> TSO/ISPF
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
veena_nagesh2002
Warnings : 1

Active User


Joined: 07 May 2005
Posts: 110
Location: hyderabad

PostPosted: Wed Nov 19, 2008 8:44 am
Reply with quote

The below code working fine when it is a member and date is hardcoded

Code:
/* REXX */                                                 

DatGrg = '20090228'                                       
ddd = Date('D',DatGrg,'S')                                 
DatJul  = Substr(DatGrg,1,4)||ddd                         

or

DATEIN = '20120229'                                       
ABC = DATE('D',DATEIN,'S')                                 
JDAT = RIGHT(SUBSTR(DATEIN,1,4),4,'0')||RIGHT(ABC,3,'0')   


if it used in a panel then facing the problems like unknown statements

info about panel : User will key the year month and date,

Code:
                            YEAR   MONTH   DATE   JULIAN
ENTER AFCDATE DETAILS   : _JYER+  _JMON+ _JDAT+  @JDAY+


by using the above code i want populate the julian date in JDAY. how to interlink this and need to fresh the same when ever he changes the above date.
Back to top
View user's profile Send private message
Pedro

Global Moderator


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

PostPosted: Wed Nov 19, 2008 10:04 am
Reply with quote

rexx does not have screens. I think you are talking about ISPF panels.

But rexx and ISPF work pretty well together. Just use the same variable names in both the rexx program and the ISPF panel. The variable name has to follow ISPF naming conventions.

Use the DISPLAY service of ISPF service to display a panel.
Back to top
View user's profile Send private message
veena_nagesh2002
Warnings : 1

Active User


Joined: 07 May 2005
Posts: 110
Location: hyderabad

PostPosted: Wed Nov 19, 2008 10:23 am
Reply with quote

thx alot for your response

any example to receive and pass values to rexx member from ispf panel

if so please give sample
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Wed Nov 19, 2008 11:33 am
Reply with quote

there is no need for an example, I will just repeat the concept..

Code:
some rexx processing          : .....
assigne a value to a variable : myvar = some_value
display a panel               : Address ISPEXEC DISPLAY PANEL(mypanel)

if the panel contains a field named "myvar" it will display "some_value"

when the control comes back to Your rexx script
if the panel contains a field named "xxxxx"
the rexx variable "xxxxx" will automatically contain the value entered in the panel
Back to top
View user's profile Send private message
Pedro

Global Moderator


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

PostPosted: Wed Nov 19, 2008 10:24 pm
Reply with quote

Quote:
by using the above code i want populate the julian date in JDAY

No, the above code does nothing with JDAY.

The rexx program should be separate from the ISPF panel. The rexx program is a member of your ALTLIB or SYSEXEC concatentation. The ISPF panel is a member of your LIBDEF ISPPLIB allocation.

The rexx program sets if variables then uses DISPLAY service to display the panel.
Back to top
View user's profile Send private message
veena_nagesh2002
Warnings : 1

Active User


Joined: 07 May 2005
Posts: 110
Location: hyderabad

PostPosted: Thu Nov 20, 2008 8:49 am
Reply with quote

The below is the ispf panel which i was coded as separate member where i want to display the julianday on JDAT field in this panel when ever user is keyed. note : consider this member name as GFCMEN

Code:
)ATTR                                                       
  @ TYPE(OUTPUT) INTENS(LOW)  CAPS(OFF)                     
  ! TYPE(INPUT)  INTENS(NON)                                 
  ¢ TYPE(TEXT)   INTENS(HIGH) COLOR(WHITE) HILITE(REVERSE)   
  # TYPE(TEXT)   INTENS(LOW)   SKIP(ON)                     
)BODY expand($$)                                             
+$-$¢ FDS TESTING MAIN MENU  +$-$                       
%Option+===>_ZCMD                                           
+$ $       Userid...:@JUID     +                             
+$ $       Center...:@JCTR     +                             
+$ $   IMS Region...:_JREG     +                             
+                                                           
% H  -        - +HOUSEKEEP                                   
% F  -        - +FRONT END                                   
% S  -        - +SUBMISSION                                 
% V  -        - +VALIDATION                                 
% P  -        - +POSTING                                     
+                                                           
+                             YEAR   MONTH   DATE   JULIAN   
+ ENTER AFCDATE DETAILS   : _JYER+  _JMON+ _JDAT+  _JDAY+     
+                                                             
+ ENTER HOLIDAY INDICATOR : _JHND+                           
+                                                             
+ ENTER CENTER CODE       : _JCNT+                           
+                                                             
+ Warnings : @JWAR                                           
+                                                             
+                                                             
+ Hit PF3(END) to exit  + $ $ Time...:@JTIM     +             
)INIT                                                         
                                                             
  VGET (JUID JREG) PROFILE                                   
  VGET (JHRS JMIN JTIM) PROFILE                               
  VGET (JDAY JTXT JCTR) PROFILE                               
  VGET (JDAT JMON JYER) PROFILE                               
  VGET (JTF1 JTF2 JTF3 JORG JEND) PROFILE                     
                                                             
 &ZCMD =.CURSOR                                               
)PROC                                               
                                                   
 REFRESH *                                         
                                                   
 &OPT = TRUNC(&ZCMD,1)                             
                                                   
      VER (&JDAT,NB,NUM,MSG=GFCEF000)               
      VER (&JDAT,NB,RANGE,01,31,MSG=GFCEF001)       
                                                   
      VER (&JMON,NB,NUM,MSG=GFCEF002)               
      VER (&JMON,NB,RANGE,01,12,MSG=GFCEF003)       
                                                   
      VER (&JDAY,NB,NUM,MSG=GFCEF004)               
      VER (&JDAY,NB,RANGE,001,366,MSG=GFCEF005)     
                                                   
      VER (&JYER,NB,NUM,MSG=GFCEF006)               
      VER (&JYER,NB,RANGE,2001,2015,MSG=GFCEF007)   
                                                   
      VER (&JREG,NB,LIST,IMST,IMSR,MSG=GFCEF008)       
                                                       
      VPUT (JUID JREG) PROFILE                         
      VPUT (JHRS JMIN JTIM) PROFILE                   
      VPUT (JDAY JTXT JCTR) PROFILE                   
      VPUT (JDAT JMON JYER) PROFILE                   
      VPUT (JTF1 JTF2 JTF3 JORG JEND) PROFILE         
                                                       
 &ZSEL = TRANS( TRUNC (&ZCMD,'.') H,'CMD(%GFCHUS)'     
                                  F,'PANEL(GFCFRT)'   
                                  S,'PANEL(GFCSUB)'   
                                  V,'PANEL(GFCVAL)'   
                                  P,'PANEL(GFCPOS)')   
  &ZTRAIL = .TRAIL                                     
)END                                                   


and below is the rexx code which i had in an separate member(consider this member as (Julian)

Code:
/* REXX */                                                 
DATEIN = '20120229'                                       
ABC = DATE('D',DATEIN,'S')                                 
JDATout = RIGHT(SUBSTR(DATEIN,1,4),4,'0')||RIGHT(ABC,3,'0')   


now should i need to call the panel from rexx or panel to rexx pgm, since i was strucked at this point from a long time or else advice me the code changes in respective areas to get desired output.


Code:
ALTLIB ACTIVATE APPLICATION(CLIST) DATASET('PXXXXXA.NAG.SYSPROC')  <<< rexx PGM (JULIAN) is present here
                                                                   
ISPEXEC LIBDEF ISPSLIB DATASET ID('PXXXXXA.NAG.SPFPROCS.ISPSLIB') 
ISPEXEC LIBDEF ISPPLIB DATASET ID('PXXXXXA.NAG.SPFMENUS.ISPPLIB')  <<< GFCMEN is coded here 
ISPEXEC LIBDEF ISPMLIB DATASET ID('PXXXXXA.NAG.SPFMESGS.ISPMLIB') 
ISPEXEC LIBDEF ISPLLIB DATASET ID('PXXXXXA.NAG.SPFPGMLB.ISPLLIB' +
                                  'PXXXXXA.NAG.SPFLNKLB.ISPLLIB') 
Back to top
View user's profile Send private message
Pedro

Global Moderator


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

PostPosted: Thu Nov 20, 2008 10:00 am
Reply with quote

1. after your libdefs, call your JULIAN exec.

2. At the end of your JULIAN exec add
Code:
Address ISPEXEC "SELECT PANEL(GFCMEN)"

Earlier, I had said to use the DISPLAY service, but I see in your panel that is actually a menu. Use SELECT instead.

3. and, this is the third time this is mentioned...use the same name for the variables. Your panel has JDAT, but your JULIAN program has JDATout. Use the same variable name (fourth time).

4. Use the same variable name. (fifth time)
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Thu Nov 20, 2008 10:21 am
Reply with quote

So, Pedro - don't hold back now, would you suggest using the same variable name? sterb050.gif

d
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 -> TSO/ISPF

 


Similar Topics
Topic Forum Replies
No new posts Execute secondary panel of sdsf with ... CLIST & REXX 1
No new posts How to pass the PARM value to my targ... COBOL Programming 8
No new posts Dynamically pass table name to a sele... DB2 2
No new posts Call program, directly from panel CLIST & REXX 9
No new posts interactive cics program using CICS s... CICS 5
Search our Forums:

Back to Top