View previous topic :: View next topic
|
Author |
Message |
Ben Deuerling
New User
Joined: 18 Apr 2015 Posts: 3 Location: USA
|
|
|
|
Hello,
I have a COBOL driven ISPF panel which has field to enter a "starting" point for the list displayed on the next ISPF panel.
the variable name is FIRSTCRD.
Code: |
+ START ELEMENT LIST AT _FIRSTRCD+ |
The ATTR for _ is:
Code: |
_ TYPE(INPUT) INTENS(HIGH) CAPS(ON) PAD(_) |
When we enter a non-numeric in FIRSTCRD, the list is displayed with no issues.
When we enter a numeric in FIRSTCRD like the number 1, we get the ISPV009 error.
Code: |
++++++++++++++++++++++++++++++++++++++++++
********************************************
* ISPV009
*
* Invalid variable name
* Variable '1' is syntactically incorrect.
*
++++++++++++++++++++++++++++++++++++++++++ |
not sure why ISPF is using the value of FIRSTCRD as a variable name.
Any Ideas on how to fix this error? |
|
Back to top |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1788 Location: Bloomington, IL
|
|
|
|
Please show the relevant code from your program and panel. |
|
Back to top |
|
|
Ben Deuerling
New User
Joined: 18 Apr 2015 Posts: 3 Location: USA
|
|
|
|
PANEL
Code: |
)ATTR
_ TYPE(INPUT) INTENS(HIGH) CAPS(ON) PAD(_)
¬ TYPE(INPUT) INTENS(HIGH) CAPS(ON)
@ TYPE(OUTPUT) INTENS(HIGH)
# TYPE(OUTPUT) INTENS(LOW)
+ TYPE(TEXT) INTENS(LOW) SKIP(ON)
% TYPE(TEXT) INTENS(HIGH) SKIP(OFF)
)BODY
+XXXXXX01%------------- SELECT TYPE OF THING TO LIST -------------
%COMMAND ===>¬ZCMD
%
%
% 1+TYPE ONE
% 2+TYPE TWO
%
+ START ELEMENT LIST AT _FIRSTRCD+
%
%
)INIT
.HELP = HELP1SA0
.ZVARS ='(VERSION)'
&VERSION = V0.1
VGET FIRSTRCD PROFILE
)PROC
VER(&ZCMD,NONBLANK,LIST,1,2,01,02)
&OPT = TRANS(&ZCMD 1,01 2,02)
VER (&OPT,RANGE,01,02)
IF (&OPT = '01')
&ETYPE3 = 'ONE'
IF (&OPT = '02')
&ETYPE3 = 'TWO'
IF (&FIRSTRCD = '')
&FIRSTRCD = 'A'
VPUT ETYPE3 PROFILE
VPUT FIRSTRCD PROFILE
)END |
COBOL
Code: |
01 ISPF-PANEL-DATA.
05 VPANEL1 PIC X(8) VALUE 'XXXXXX01'.
05 FIRSTRCD PIC X(40) VALUE SPACE.
05 NFIRSTRCD PIC X(10) VALUE '(FIRSTRCD)'.
CALL 'ISPLINK' USING VDEFINE NFIRSTRCD FIRSTRCD CHAR LEN8
CALL 'ISPLINK' USING VDISPLAY VPANEL1 VMSG |
|
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2455 Location: Hampshire, UK
|
|
|
|
Please use the code tags for code and data (and anything else requiring a fixed font). |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2547 Location: Silicon Valley
|
|
|
|
This is only a guess.
Quote: |
05 FIRSTRCD PIC X(40) VALUE SPACE.
05 NFIRSTRCD PIC X(10) VALUE '(FIRSTRCD)'. |
and with LEN8...
Is it possible that there is an overlap in the storage of where the name of the variable is and the value of the variable?
Use your debugger to display the storage before the DISPLAY and again after the DISPLAY. |
|
Back to top |
|
|
Ben Deuerling
New User
Joined: 18 Apr 2015 Posts: 3 Location: USA
|
|
|
|
Pedro
Thanks for your suggestion.
I really thought this was within the ISPF panel.
I added the displays and found where I call ISPLINK with the value of FIRSTRCD.
Thanks,
Ben |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2547 Location: Silicon Valley
|
|
|
|
Quote: |
found where I call ISPLINK with the value of FIRSTRCD. |
I am glad that you found the problem.
In the future, please post the actual ISPLINK statements from your program. It is easier for us to help. |
|
Back to top |
|
|
|