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

Issue while passing variable from COBOL to ISPF PANEL


IBM Mainframe Forums -> TSO/ISPF
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Priti1.n

New User


Joined: 13 Jan 2012
Posts: 2
Location: India

PostPosted: Fri Jan 13, 2012 6:24 pm
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Fri Jan 13, 2012 6:46 pm
Reply with quote

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
View user's profile Send private message
Priti1.n

New User


Joined: 13 Jan 2012
Posts: 2
Location: India

PostPosted: Fri Jan 13, 2012 7:36 pm
Reply with quote

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
View user's profile Send private message
Pedro

Global Moderator


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

PostPosted: Sat Jan 14, 2012 12:45 am
Reply with quote

In your COBOL, try VPUT to SHARED

And in your panel, issue VGET from SHARED.
Back to top
View user's profile Send private message
don.leahy

Active Member


Joined: 06 Jul 2010
Posts: 765
Location: Whitby, ON, Canada

PostPosted: Sat Jan 14, 2012 1:42 am
Reply with quote

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
View user's profile Send private message
Stefan

Active User


Joined: 12 Jan 2006
Posts: 110
Location: Germany

PostPosted: Mon Jan 16, 2012 9:18 pm
Reply with quote

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
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 Replace each space in cobol string wi... COBOL Programming 3
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts COBOL -Linkage Section-Case Sensitive COBOL Programming 1
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts COBOL ZOS Web Enablement Toolkit HTTP... COBOL Programming 0
Search our Forums:

Back to Top