View previous topic :: View next topic
|
Author |
Message |
Mary Lewis
New User
Joined: 25 Dec 2007 Posts: 15 Location: Albany, NY
|
|
|
|
We are in the process of testing an upgrade from Easytrieve 6.4 to R11, on a z/OS 1.7 mainframe.
I recompiled 140 Easytrieve programs that use DB2. I got the same error in 6 programs that work similarly, as follows:
1.) Each has a sequential file as input (JOB INPUT <seq file name>)
2.) First statement following JOB stmt, assign input file fields to working storage fields.
3.) Next stmt PERFORMs proc to access DB2 table with working storage fields from #2.
4.) DB2 access proc performs CHECKSQL proc, which says IF SQLCODE NE 0 100 than abort program.
5.) Next stmt after #3 is IF SQLCODE = 100 Display msg.
This is where a compile error occurs:
IF SQLCODE = 100
EZTC0125E >>> $ fieldname not defined
The IF SQLCODE stmt in CHECKSQL proc does not get an error.
Please advise as to how to fix this error. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Please post more of the relevant code.
From what you've posted, something referenced is not defined, but we have nothing to work with to try to help.
How is the same sort of checking handled in the majority of modules that do not raise the same error?
Is all of your Easytrieve compiled or is some of it run interpreted?
Have you initated a trouble call with CA support (or searched the knowledge base there)? This may be a known upgrade situation due to un-planned differences between releases. |
|
Back to top |
|
|
Mary Lewis
New User
Joined: 25 Dec 2007 Posts: 15 Location: Albany, NY
|
|
|
|
Here is the code minus the REPORT step, with the error:
Code: |
FILE PRINTER1 PRINTER
FILE PERPOS
SSN 1 9 A
ITEM 11 5 A
CHECKSORT 42 10 A
WS-ERROR-LOCATION S 20 A
*
JOB INPUT PERPOS
IF CHECKSORT > ' '
PERFORM UPDATE-LOC-CD
IF SQLCODE = 100
EZTC0125E >>> $ fieldname not defined
DISPLAY 'NOT FOUND FOR UPDATE ' SSN ' ' ITEM
ELSE
PRINT REPORT1
END-IF
END-IF
*
UPDATE-LOC-CD. PROC
SQL UPDATE TBPAY_PERPOS +
SET PYPP_LOC_CD = :CHECKSORT +
WHERE PYPP_SSN = :SSN +
AND PYPP_LINE_NO = :ITEM
WS-ERROR-LOCATION = 'UPDATE PYPP-LOC-CD'
PERFORM CHECKSQL
END-PROC
*
CHECKSQL. PROC
IF SQLCODE ¬= 0 100
DISPLAY '*********************************'
DISPLAY '** YOUR PROGRAM HAS ABORTED - ' SQLCODE ' ***** '
DISPLAY '** ERROR LOCATION IS ' WS-ERROR-LOCATION
DISPLAY '*********************************'
RETURN-CODE = 16
STOP EXECUTE
END-IF
END-PROC |
|
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
What happens if you comment out this line:
Code: |
DISPLAY 'NOT FOUND FOR UPDATE ' SSN ' ' ITEM |
|
|
Back to top |
|
|
Mary Lewis
New User
Joined: 25 Dec 2007 Posts: 15 Location: Albany, NY
|
|
|
|
That is not the line that has the error. It is the previous line.
In another program the code was as follows:
IF SQLCODE = 100
W-RGN-TO-PRINT = 0
ELSE
......
The compiler output looked like this:
IF SQLCODE = 100
EZTC0125E >>> $ fieldname not defined
W-RGN-TO-PRINT = 0
ELSE
....... |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hi Mary,
Quote: |
That is not the line that has the error. |
Yup, i knew that - was just curious if the symptoms changed with that line removed/commented.
Have you opened an issue with CA support?
I'm unable to remotely connect to my CA "stuff" just now, but may be on-site over the weekend. If i am, i'll do some more looking/head scratching. |
|
Back to top |
|
|
|