Name is undefined



Unicenter CA-Easytrieve Plus Report Generator: CA's information retrieval and data management tool

Name is undefined

Postby nicole » Tue Jul 27, 2010 1:44 am

Hi there,

I do not understand the error I am getting in my easytrieve program. I am quite sure I have declared the name but still getting this same error:

WS1-LABEL(WS1-SUPP-HST-BC-POS) = 'HST - HST-BC'
**B082 NAME IS UNDEFINED - WS1-SUPP-HST-BC-POS

AND THIS ERROR:

*******B260 LITERAL LENGTH MUST BE EQUAL TO FIELD LENGTH - HST-MOB-BC
WS1-TEMP-INDEX = WS1-SUPP-HST-MOB-BC-POS

Any help please.
nicole
 
Posts: 23
Joined: Thu Jul 22, 2010 10:02 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Name is undefined

Postby dick scherrer » Tue Jul 27, 2010 1:47 am

Hello,

If Easytrieve says there is something wrong, i tend to believe it. . .

For us to help, you need to provide the problem code/variables not just the error messages.

I am quite sure I have declared the name but still getting this same error:
Post the code just before this thru just after (only a few lines).

There is no literal shown in the posted info :?
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: Name is undefined

Postby nicole » Tue Jul 27, 2010 2:43 am

Ok before I post anything more, what exactly is a literal.
nicole
 
Posts: 23
Joined: Thu Jul 22, 2010 10:02 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Name is undefined

Postby dick scherrer » Tue Jul 27, 2010 3:04 am

Hello,

Something that is not variable. . .

In COBOL:
IF FIELD-A = 'RREETTYY'

RREETTYY is a literal.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: Name is undefined

Postby nicole » Tue Jul 27, 2010 3:12 am

This was what I defined in my report variables:

WS1-SUPP-HST-BC-POS W 02 N VALUE 28

Initaialize Table:

WS1-LABEL(WS1-SUPP-HST-BC-POS)= 'HST - HST-BC'

Process .proc:

WHEN 'HST-BC'
WS1-TEMP-INDEX = WS1-SUPP-HST-BC-POS

Ok I hope this helps..thanks.
nicole
 
Posts: 23
Joined: Thu Jul 22, 2010 10:02 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Name is undefined

Postby dick scherrer » Tue Jul 27, 2010 9:10 am

Hello,

You have chosen to only post a tiny bit of the problem code. . . And did not include the the source with the errors Easytrieve detected.

You need to post the definitions of all of the referenced fields and the code surrounding any line that causes an error along with the complete error line(s).
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: Name is undefined

Postby nicole » Tue Jul 27, 2010 7:56 pm

Hi Mr. Scherrer, Hope this is the rest you need to help me.

2427           WHEN 'SSC       '                                       
2428             CASE SRC-ID-71                                       
2429                WHEN 'SASKMOBILE '                                 
2430                     WS1-TEMP-INDEX = WS1-SUPP-ONE-POS             
2431                WHEN 'HST     '                                   
2431 *******B260 LITERAL LENGTH MUST BE EQUAL TO FIELD LENGTH - HST   
2432                     WS1-TEMP-INDEX = WS1-SUPP-HST-POS


2441                 WHEN 'HST-MOB     '                               
2441 *******B260 LITERAL LENGTH MUST BE EQUAL TO FIELD LENGTH - HST-MOB
2442                      WS1-TEMP-INDEX = WS1-SUPP-HST-MOB-POS
nicole
 
Posts: 23
Joined: Thu Jul 22, 2010 10:02 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Name is undefined

Postby dick scherrer » Wed Jul 28, 2010 3:10 am

Hello,

Hope this is the rest you need to help me
Unfortunately, it is not. . .

To repeat:
You need to post the definitions of all of the referenced fields
I do not see the definition of the fields referenced in the code.

The B260 is caused by the length of the literals in those statements - they all need to be the same length as the data field. The first literal appears to be correct, but for some reason the others are different lengths. . .

How many times is the "name is undefined" error shown? How many times is this field referenced in the code?
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: Name is undefined

Postby nicole » Wed Jul 28, 2010 8:58 pm

Hey D.S.

Ok I figured it out and sorry again I didn't post enough info. but I'll eventually get the hang of it. So here is where I went wrong:

WHEN 'HST ' <--- I did not have the proper amount of spaces.
WS1-TEMP-INDEX = WS1-SUPP-OTH-POS

Now I understand, sorry if I wasted your time, but thanks again. Have a great day. Nicole
nicole
 
Posts: 23
Joined: Thu Jul 22, 2010 10:02 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Name is undefined

Postby dick scherrer » Thu Jul 29, 2010 12:34 am

Hi Nicole,

You're welcome

Now I understand, sorry if I wasted your time, but thanks again.
No, not wasted. We're here to help when things don't "click". One of the things that will be invaluable is developing a way to get most of the needed information "in play" on the first post. It really doesn't cost us so much to ask for more info, but it slows your getting a solution ;)

This is true if the question is posted on a forum or to some vendor support.

Good luck and someone will be here when there are other questions,

d
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times


Return to CA-Easytrieve