|
|
| Author |
Message |
veena_nagesh2002 Warnings : 1 Active User
Joined: 07 May 2005 Posts: 112 Location: hyderabad
|
|
|
|
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 |
|
 |
References
|
|
 |
Pedro
Senior Member
Joined: 01 Sep 2006 Posts: 630 Location: work
|
|
|
|
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 |
|
 |
veena_nagesh2002 Warnings : 1 Active User
Joined: 07 May 2005 Posts: 112 Location: hyderabad
|
|
|
|
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 |
|
 |
Moved: Wed Nov 19, 2008 10:38 am by superk From CLIST & REXX to TSO/ISPF |
enrico-sorichetti
Global Moderator
Joined: 14 Mar 2007 Posts: 3272 Location: italy
|
|
|
|
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 |
|
 |
Pedro
Senior Member
Joined: 01 Sep 2006 Posts: 630 Location: work
|
|
|
|
| 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 |
|
 |
veena_nagesh2002 Warnings : 1 Active User
Joined: 07 May 2005 Posts: 112 Location: hyderabad
|
|
|
|
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 |
|
 |
Pedro
Senior Member
Joined: 01 Sep 2006 Posts: 630 Location: work
|
|
|
|
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 |
|
 |
dick scherrer
Global Moderator
Joined: 23 Nov 2006 Posts: 9186 Location: 221 B Baker St
|
|
|
|
So, Pedro - don't hold back now, would you suggest using the same variable name?
d |
|
| Back to top |
|
 |
|
|
|