I am trying to run a sample CA Easytrieve DB2 job and getting a B061 error. How can I correct this?

Document ID : KB000013026
Last Modified Date : 14/02/2018
Show Technical Document Details
Question:

I am trying to run a CA Easytrieve DB2 program just as a sample IVP and getting the following compiler error.  How may I correct this?

14 LINE NAME CREATOR 00390001 
14 *******B061 REPORT LINE OVERFLOWED BY - 126 

Answer:

Based on the fact that the previous line 12 is coded as: 

12 REPORT RPT1 LINESIZE 133  

and the two fields, NAME and CREATOR, are now 130 bytes each under DB2: 

0000 130 AV 03 NAME 
0000 2 B 04 LENGTH 
0002 128 A 04 DATA 
0082 130 AV 03 CREATOR 
0082 2 B 04 LENGTH 
0084 128 A 04 DATA 

the following program will work as an IVP as it involves fields on the LINE statement which total less than the 133 as specified as the LINESIZE on the REPORT statement:

 PARM SSID('xxxx') 
 DEFINE WKNAME W 18 A 
 DEFINE WKCREATOR W 8 A 
 FILE SQLFILE SQL + 
 (SELECT NAME, CREATOR FROM SYSIBM.SYSTABLES INTO :WKNAME, :WKCREATOR) 
 DEFINE WS-COUNT W 2 N 0 
 JOB INPUT SQLFILE 
 WS-COUNT = WS-COUNT + 1 
 IF WS-COUNT GT 10 
 STOP 
 END-IF 
 PRINT RPT1 
 REPORT RPT1 LINESIZE 130 
 TITLE 'TEST FOR CA PAN/SQL INSTALLATION' 
 LINE WKNAME WKCREATOR