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

ISPV009 - Invalid variable name Variable '1'


IBM Mainframe Forums -> TSO/ISPF
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Ben Deuerling

New User


Joined: 18 Apr 2015
Posts: 3
Location: USA

PostPosted: Mon Apr 20, 2015 7:34 pm
Reply with quote

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

Global Moderator


Joined: 03 Oct 2009
Posts: 1788
Location: Bloomington, IL

PostPosted: Mon Apr 20, 2015 7:38 pm
Reply with quote

Please show the relevant code from your program and panel.
Back to top
View user's profile Send private message
Ben Deuerling

New User


Joined: 18 Apr 2015
Posts: 3
Location: USA

PostPosted: Mon Apr 20, 2015 7:56 pm
Reply with quote

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

Global Moderator


Joined: 10 May 2007
Posts: 2455
Location: Hampshire, UK

PostPosted: Mon Apr 20, 2015 8:28 pm
Reply with quote

Please use the code tags for code and data (and anything else requiring a fixed font).
Back to top
View user's profile Send private message
Pedro

Global Moderator


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

PostPosted: Tue Apr 21, 2015 12:59 am
Reply with quote

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

New User


Joined: 18 Apr 2015
Posts: 3
Location: USA

PostPosted: Tue Apr 21, 2015 1:43 am
Reply with quote

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

Global Moderator


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

PostPosted: Tue Apr 21, 2015 9:25 pm
Reply with quote

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
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 Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts Variable Output file name DFSORT/ICETOOL 8
No new posts Moving Or setting POINTER to another ... COBOL Programming 2
No new posts parsing variable length/position data... DFSORT/ICETOOL 5
No new posts Masking variable size field - min 10 ... DFSORT/ICETOOL 4
Search our Forums:

Back to Top