I have an ISPF panel named MYPANEL created with 2 variables: One for input named INV (filled by the user) and one for output named OTV (filled by the program). What I need is a sample with a COBOL program, on how to call the panel, how to receive the variable INV and how to send the variable OTV with the value of INV + ' the output'.
Asked
Active
Viewed 541 times
2
-
2Try using the `ispf edit` **model** command (in spf edit command line). This will generate sample code + has help information on the various ISPF calls. – Bruce Martin Feb 15 '19 at 03:56
-
2You use the **display** service (https://www.ibm.com/support/knowledgecenter/en/SSLTBW_2.1.0/com.ibm.zos.v2r1.f54sg00/display.htm) to display a panel – Bruce Martin Feb 15 '19 at 07:27
-
2You use **VDefine** (https://www.ibm.com/support/knowledgecenter/en/SSLTBW_2.1.0/com.ibm.zos.v2r1.f54sg00/display.htm) to define variables.. It is a lot easier in rexx – Bruce Martin Feb 15 '19 at 07:29
-
1To elaborate on Bruce Martin's first comment, 1) make sure you are editing with a COBOL profile (hopefully a PDS with the last level qualifier of COBOL); 2) on the MODEL panel, you want to look at V1, V2, V3, and D1, and you will need W1 as well. – zarchasmpgmr Feb 15 '19 at 21:46
1 Answers
3
Many years ago ISPF used to have an examples manual. Here is a link to a COBOL example from the ISPF 4.2 manual (around 1995 or so).
One thing to remember in using VDEFINE in COBOL (or any language) is that this defines storage to ISPF. ISPF expects that storage to stay around until the VDELETE is done or the function pool created by the SELECT service goes away. So be careful in calling a routine to do VDEFINES and then returning to a program. The called routines storage that was VDEFINE'd must still be owned by the main COBOL program or you can get 0C4's.

Marv Knight
- 416
- 2
- 4