View previous topic :: View next topic
|
Author |
Message |
Priti1.n
New User
Joined: 13 Jan 2012 Posts: 2 Location: India
|
|
|
|
Hi Iam displaying ISPF panel through Cobol program. as follows:
CALL 'ISPLINK' USING ISPF-DISPLAY ISPF-PANEL-5
where ISPF-DISPLAY =Display and ISPF-PANEL-5 is my panelname.
In the panel I want to display a warning message based on a condition in cobol program.
To achieve this Iam using follow code;
CALL 'ISPLINK' USING ISPF-VDEFINE ISPF-WRNGA FP-WRNGA
ISPF-CHAR BY CONTENT LENGTH OF FP-WRNGA
here FP-WRNGA is my function pool variable and ISPF-WRNGA holds the name of panel varaible in which error msg is to be populated.
Iam moving my message to function pool variable:
MOVE WS-PNLA-WRNG1 TO FP-WRNGA
However this message is not getting displayed on the panel.
My panel is coded as follows:
Code: |
)ATTR
¦ TYPE(TEXT) INTENS(NON)
? TYPE(OUTPUT) INTENS(LOW)
)BODY
%--------------------- Confirmation for Event Completion ---------------
%COMMAND ===>_ZCMD
+
+
+
¦|----------------------------------------------------------------------
¦| WARNING! ?WRNGA
¦|----------------------------------------------------------------------
+ %PF3 +to end this panel without completing the event
)INIT
IF (&OPT = 'Z')
.ATTRCHAR(¦) = 'TYPE(TEXT) INTENS(HIGH)'
.ATTRCHAR(?) = 'TYPE(OUTPUT) INTENS(HIGH) COLOR(&CLR)'
.ATTR(T) = 'TYPE(INPUT) INTENS(HIGH)'
.ALARM = YES
)PROC
)END |
|
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
why reinvent the wheel...
use the SETMSG ISPF function
fill the ISPF variables
zedsmsg for the short message ( will be displayed in the upper right corner of the screen )
zedlmsg for the long message ( which will be displayed according to the ISPF settings hitting the PF1 after the short message has been displayed)
and invoke the ISPF function SETMSG MSG(ISRZ001)
and if things have been setup properly hitting again PF1 will show the relative HELP panel |
|
Back to top |
|
|
Priti1.n
New User
Joined: 13 Jan 2012 Posts: 2 Location: India
|
|
|
|
Thanks Enrico, But I can not use this functionality as my panel contain some other data as well and it should display this message at the bottom and receive user's response.
based on user's responce I have to do further processing.
e.g: DO YOU WANT TO CONTINUE (Y/N): __
I had used above approach earlier but i know that iam missing something here but do not recollect it.
Can anyone help in this approach or suggest alternate method by which I can display a conditional message and receive user's response. |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2547 Location: Silicon Valley
|
|
|
|
In your COBOL, try VPUT to SHARED
And in your panel, issue VGET from SHARED. |
|
Back to top |
|
|
don.leahy
Active Member
Joined: 06 Jul 2010 Posts: 765 Location: Whitby, ON, Canada
|
|
|
|
Use Dialog test. If you set a breakpoint before your DISPLAY command you can look at the variable pools to see where your value is. |
|
Back to top |
|
|
Stefan
Active User
Joined: 12 Jan 2006 Posts: 110 Location: Germany
|
|
|
|
Pedro is right. When using a compiler language, you have to use VPUT/VGET services to interact with ISPF panels. ISPF is able to access and manipulate the variables used by the REXX interpreter and by the CLIST command processor. So only for these languages you might avoid the use of VPUT/VGET services. |
|
Back to top |
|
|
|