Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

ISPV009 - Invalid variable name Variable '1'

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF
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    Post subject: ISPV009 - Invalid variable name Variable '1'
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: 1754
Location: Bloomington, IL

PostPosted: Mon Apr 20, 2015 7:38 pm    Post subject:
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    Post subject: Here is the panel code/COBOL
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: 1787
Location: UK

PostPosted: Mon Apr 20, 2015 8:28 pm    Post subject:
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

Senior Member


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

PostPosted: Tue Apr 21, 2015 12:59 am    Post subject: Reply to: ISPV009 - Invalid variable name Variable '1'
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    Post subject: Reply to: ISPV009 - Invalid variable name Variable '1'
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

Senior Member


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

PostPosted: Tue Apr 21, 2015 9:25 pm    Post subject: Reply to: ISPV009 - Invalid variable name Variable '1'
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    IBMMAINFRAMES.com Support Forums -> TSO/ISPF All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 11 Tue May 16, 2017 2:20 pm
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
No new posts Writing on to GSAM variable length rohanthengal JCL & VSAM 6 Fri Mar 03, 2017 7:46 pm
No new posts Count Trailing Spaces in variable str... Virendra Shambharkar SYNCSORT 10 Thu Feb 02, 2017 12:23 pm
No new posts INVALID FIELD OR CONSTANT IN SORTOF ?? Ron Klop DFSORT/ICETOOL 8 Wed Jan 11, 2017 3:44 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us