View previous topic :: View next topic
|
Author |
Message |
hdc123
New User
Joined: 15 May 2006 Posts: 7
|
|
|
|
How to display messages like 'Invalid Name' or 'Invalid Cursor Position' on panel itself?
I am using SETMSG but it is not working. |
|
Back to top |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
Can you show us your panel ? (please use CODE)
O. |
|
Back to top |
|
|
hdc123
New User
Joined: 15 May 2006 Posts: 7
|
|
|
|
ofer71 wrote: |
Can you show us your panel ? (please use CODE)
O. |
hi ofer71,
thanks for ur reply.
i want to show message through rexx program not using )PROC of panel.
What i have coded is like this:
"libdef ispmlib dataset id(PDS)"
do forever
"display panel(mainpan)"
select
when zsel = 1 then
call readtable
when zsel = 2 then
call scantable
when keypress = PF03 then
exit
otherwise
"setmsg msg(ispfms12)"
end
end
exit
Is it possible to show message like this? |
|
Back to top |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
I have a feeling that you want to display an ISPF table. However, you are using the DISPLAY service instead TBDISPL.
Again, can you show us the panel itself?
O. |
|
Back to top |
|
|
hdc123
New User
Joined: 15 May 2006 Posts: 7
|
|
|
|
ofer71 wrote: |
I have a feeling that you want to display an ISPF table. However, you are using the DISPLAY service instead TBDISPL.
Again, can you show us the panel itself?
O. |
hey i no i am not displaying table, my panel is like this:
)ATTR
% TYPE(TEXT) INTENS(HIGH)
+ TYPE(TEXT) INTENS(LOW)
_ TYPE(INPUT) INTENS(HIGH) CAPS(ON) JUST(LEFT)
! TYPE(PS)
@ TYPE(PT)
$ TYPE(FP)
? TYPE(PIN)
)BODY EXPAND(//)
@/-/- Display -/-/
$Option ===>_ZCMD $Date->&ZDATESTD
+
? Enter what you want to do :
+
+ %1+ View the list
%2+ Edit the list
+
? F1 = Help F3 = Exit
+
)INIT
.HELP = helpmain
)PROC
&ZSEL=&ZCMD
&KEYPRESS =&ZPFKEY
)END |
|
Back to top |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
Here is a little trick:
Code: |
)ATTR
+ TYPE(TEXT) INTENS(LOW) SKIP(ON) COLOR(GREEN)
% TYPE(TEXT) INTENS(HIGH)SKIP(ON) PAD(' ')
_ TYPE(INPUT) INTENS(HIGH) HILITE(USCORE)
? TYPE(TEXT) INTENS(NON) SKIP(ON) COLOR(GREEN)
\ TYPE(INPUT) INTENS(NON) HILITE(USCORE)
! TYPE(OUTPUT) INTENS(LOW) SKIP(ON) COLOR(RED) CAPS(OFF)
)BODY WINDOW (58,14)
%&ZDATE + %&ZTIME
+
+
+PDS ==>_DELPDS +
+
+Pattern ==>_WILDCARD+
+
+
?Confirm deletion ===>\CON?(Yes/No)
+
+
!DMSG +
+
+Press%PF3+to exit+
)INIT
VGET (TEMPCON DMSG) PROFILE
&ZWINTTL = 'Delete members of PDS'
&ZPRIM = NO
&CON = 'NO'
IF (&TEMPCON = 'SHOW')
.ATTRCHAR(?) = 'INTENS(LOW)'
.ATTRCHAR(\) = 'INTENS(HIGH)'
)PROC
VER (&CON,NB,LIST,'YES','NO','yes','no')
VER (&DELPDS,NB,DSNAME)
&DMSG = ' '
VPUT (DELPDS WILDCARD CON) PROFILE
)END |
The line "Confirm deletion ===>\CON?(Yes/No) " is displayed only if TEMPCON = 'SHOW'. TEMPCON is a variable VPUTed from REXX.
O. |
|
Back to top |
|
|
cpuhawg
Active User
Joined: 14 Jun 2006 Posts: 331 Location: Jacksonville, FL
|
|
|
|
You can send a message to the panel with REXX using:
Code: |
IF NEWJOBNM = "" THEN DO
ZEDSMSG = "JOBNAME NOT GIVEN"
ZEDLMSG = "THE JOBNAME WILL NOT CHANGE"
ADDRESS ISPEXEC "SETMSG MSG(ISRZ001)"
RETURN
END
|
In this example, if NEWJOBNM is blank, the "JOBNAME NOT GIVEN" short message will appear in the upper message area. If PF1 (HELP) is pressed, the "THE JOBNAME WILL NOT CHANGE" long message will be displayed.
You can you also use variables like:
ZEDLMSG = "THE JOBNAME WILL REMAIN"||OLDJOBNM |
|
Back to top |
|
|
hdc123
New User
Joined: 15 May 2006 Posts: 7
|
|
|
|
cpuhawg wrote: |
You can send a message to the panel with REXX using:
Code: |
IF NEWJOBNM = "" THEN DO
ZEDSMSG = "JOBNAME NOT GIVEN"
ZEDLMSG = "THE JOBNAME WILL NOT CHANGE"
ADDRESS ISPEXEC "SETMSG MSG(ISRZ001)"
RETURN
END
|
In this example, if NEWJOBNM is blank, the "JOBNAME NOT GIVEN" short message will appear in the upper message area. If PF1 (HELP) is pressed, the "THE JOBNAME WILL NOT CHANGE" long message will be displayed.
You can you also use variables like:
ZEDLMSG = "THE JOBNAME WILL REMAIN"||OLDJOBNM |
Thanks cpuhawg. |
|
Back to top |
|
|
Mickeydusaor
Active User
Joined: 24 May 2006 Posts: 258 Location: Salem, Oregon
|
|
|
|
Code: |
)PANEL
)ATTR
+ TYPE(TEXT) COLOR(BLUE) INTENS(LOW) SKIP(ON) SKIP(ON)
% TYPE(TEXT) COLOR(WHITE) INTENS(HIGH) CAPS(ON) SKIP(ON)
@ TYPE(TEXT) COLOR(YELLOW) INTENS(HIGH) CAPS(OFF) SKIP(ON)
_ TYPE(INPUT) COLOR(YELLOW) INTENS(NON) CAPS(ON)
# TYPE(OUTPUT) COLOR(YELLOW) INTENS(HIGH) CAPS(OFF) SKIP(ON)
$ TYPE(OUTPUT) COLOR(PINK) INTENS(HIGH) CAPS(OFF) SKIP(ON)
)BODY WINDOW(57,04) SMSG(SMGEMSG)
+#SMGDATE + @Rexx Processing Messages #SMGTIME +
+ +
+ +
@MSG:$SMGEMSG +
)INIT
VGET (SMGDATE SMGTIME SMGEMSG) PROFILE
)END |
Then in my rexx when I check variables or need to issue a message I do the following. Example
Code: |
IF TERMUSER = ''
THEN DO
SMGEMSG = 'Missing Required User'
SIGNAL CANUERRS
END |
Code: |
CANUERRS:
ADDRESS 'ISPEXEC'
"VPUT (SMGEMSG)" PROFILE
"ADDPOP ROW(7) COLUMN(8)"
"DISPLAY PANEL(ISPFPOPM)"
CANUEXIT:
RETURN RTRNCODE
|
I do not have to create a ISPMLIB member, and I build messages on the fly when executing my rexx and display a popup with the message. |
|
Back to top |
|
|
|