Compile error when accessing global STRWS

 11 Replies
 0 Subscribed to this topic
 17 Subscribed to this forum
Sort:
Author
Messages
Robert
Veteran Member Send Private Message
Posts: 82
Veteran Member

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 Send Private Message
Posts: 239
Veteran Member
Did you put the field size in WS-CONV-SIZE?
Robert
Veteran Member Send Private Message
Posts: 82
Veteran Member

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
Send Private Message
Posts: 3351
Did you include the PERFORM 900-LOWER-TO-UPPER ??
Thanks for using the LawsonGuru.com forums!
John
Robert
Veteran Member Send Private Message
Posts: 82
Veteran Member
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
Send Private Message
Posts: 3351
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 Send Private Message
Posts: 82
Veteran Member
John: I added the PERFORM statement and I have the same error. ** Operand WS-CASE-CONV-VALUE is not declared
John Henley
Send Private Message
Posts: 3351
Can you post your PD file here as an attachment?
Thanks for using the LawsonGuru.com forums!
John
Robert
Veteran Member Send Private Message
Posts: 82
Veteran Member
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 Send Private Message
Posts: 82
Veteran Member
John -- see that 000000 there? That's the problem.
Ragu Raghavan
Veteran Member Send Private Message
Posts: 477
Veteran Member
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 Send Private Message
Posts: 82
Veteran Member
An explicit null....clever...and aggrevating. It sure beats hardcoding the filename though. Case closed.