Compile error when accessing global STRWS

 11 Replies
 0 Subscribed to this topic
 17 Subscribed to this forum
Sort:
Author
Messages
Robert
Veteran Member
Posts: 82
Veteran Member
New Poster
New Poster
Congrats on posting!

Greetings to the Forum

4GL program construction in LSF9. 
I want to use the 900-LOWER-TO-UPPER API.
I move WS-DB-PRODUCT-LINE TO WS-CASE-CONV-VALUE.

I receive the following compile error:

**    Operand WS-CASE-CONV-VALUE is not declared

 

Sam Simpson
Veteran Member
Posts: 239
Veteran Member
Did you put the field size in WS-CONV-SIZE?
Robert
Veteran Member
Posts: 82
Veteran Member
New Poster
New Poster
Congrats on posting!

It never gets that far, the compiler throws the error
If I include the moves to the remainder of the API arguments

Operand WS-CONV-SIZE is not declared
Operand WS-BEGIN-CONV-AT is not declared

My prodecure division does not recognize any variables defined in STRWS.

John Henley
Posts: 3362
New Poster
New Poster
Congrats on posting!
Engaged Reader
Engaged Reader
You are an engaged reader!
Avid Reader
Avid Reader
Avid Reader art thou!
Did you include the PERFORM 900-LOWER-TO-UPPER ??
Thanks for using the LawsonGuru.com forums!
John
Robert
Veteran Member
Posts: 82
Veteran Member
New Poster
New Poster
Congrats on posting!
Johh, when you state "include" does that mean to actually performing the paragraph? If so, I don't make it that far...the compile throws the error on the first working storage variable it finds, e.g. WS-CASE-CON-VALUE. I don't think the PERFORM is going to remedy the compile error.
John Henley
Posts: 3362
New Poster
New Poster
Congrats on posting!
Engaged Reader
Engaged Reader
You are an engaged reader!
Avid Reader
Avid Reader
Avid Reader art thou!
You need to have the PERFORM for the API in order for the Lawson pre-compiler to know to add the API's working-storage to your .cbl file.

Thanks for using the LawsonGuru.com forums!
John
Robert
Veteran Member
Posts: 82
Veteran Member
New Poster
New Poster
Congrats on posting!
John:

I added the PERFORM statement and I have the same error.
** Operand WS-CASE-CONV-VALUE is not declared
John Henley
Posts: 3362
New Poster
New Poster
Congrats on posting!
Engaged Reader
Engaged Reader
You are an engaged reader!
Avid Reader
Avid Reader
Avid Reader art thou!
Can you post your PD file here as an attachment?
Thanks for using the LawsonGuru.com forums!
John
Robert
Veteran Member
Posts: 82
Veteran Member
New Poster
New Poster
Congrats on posting!
John.

It did compile. I passed the wrong system code to qcompile "HR" and it should have been "PR.
You conclusion was correct.

Unfortunately, the case conversion 900-UPPER-TO-LOWER failed to convert the string.

I implemented an INSPECT statement, and it converted the case using 3 lines of code.
Now my file system is properly buit, but the file I am trying to open for input can't be located.
I defined the file as INPUT using workdef.

Processing ZP868 - UNION DEDUCTIONS
Company: 0000
System Date: 20100125
System Time: 15114000
Case Converted junk
OPENING FILE $LAWDIR/junk/work/UNIONDUES/in/LO88DUES.txt
Unable To Open File With Mode "r"
/lsfprd/law/junk/work/UNIONDUES/in/LO88DUES.txt 000000
File Open Error:: No such file or directory

I can cut and past the file into vi and the file is found.

Thank John.
Robert
Veteran Member
Posts: 82
Veteran Member
New Poster
New Poster
Congrats on posting!
John -- see that 000000 there? That's the problem.
Ragu Raghavan
Veteran Member
Posts: 477
Veteran Member
New Poster
New Poster
Congrats on posting!
Engaged Poster
Engaged Poster
Wow, you're on a roll!
Avid Poster
Avid Poster
Seriously, you're a posting maniac!
Engaged Reader
Engaged Reader
You are an engaged reader!
Avid Reader
Avid Reader
Avid Reader art thou!
Did you use the STRING ccommand to build the file name ?
try ending the file name with a WS-NULL PIC x value X"00".

Like
STRING "$LAWDIR/"
PL
"UNIONDUES.TXT"
WS-NULL
INTO FILE-NAME
Robert
Veteran Member
Posts: 82
Veteran Member
New Poster
New Poster
Congrats on posting!
An explicit null....clever...and aggrevating. It sure beats hardcoding the filename though.

Case closed.