[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference eps::oracle

Title:Oracle
Notice:For product status see topics: UNIX 1008, OpenVMS 1009, NT 1010
Moderator:EPS::VANDENHEUVEL
Created:Fri Aug 10 1990
Last Modified:Fri Jun 06 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:1574
Total number of notes:4428

1524.0. "ProCOBOL Problem....any clue ?" by XFMV01::SHYAM () Sun Mar 09 1997 23:38

Hello,

I am from Digital Equipment (I) Limited, Multivendor Customer Services, Mumbai.
                                                                             
I recently performed Oracle Upgrade from V7.0.16.4.0  to Oracle V7.1.5.2.4

The said upgradation was performed at the customer site last week from the
CDROM supplied by Oracle.

The upgradation of the RDBMS server, conversion of the database from V7.0.X to
V7.1.5.X went through smoothly along with SQL*Plus, SQL*ReportWriter,
SQL*Forms,OracleTerminal, Utilities, PROCOBOL, PROC, SQL*Net etc. went through
smoothly.

But, there is a problem the customer is facing while compiling his PROCOBOL
programms. The problem description is as follows along with the partial listing
of the COBOL source code is as follows:

The line in CC1.PCO which causes problem looks something like:

	 exec sql end declare section end-exec.

The same line in CC1.COB looks like this after ProCOBOL Precompilation:

	* exec sql end declare section end-exec.

	01 	SQLFPN.
		02	SQLFPN-FILE-LEN PIC S9(4) COMP VALUE +7.
		02	SQLFPN-FILENAME PIC X(7) VALUE "cc1.PCO".

	01	SQLCTX PIC S9(4) COMP VALUE +8117.

	01	SQLEXD.
		02	SQL-SQLVSN	PIC S9(9) COMP VALUE +8.
		02	SQL-ARRSIZ	PIC S9(9) COMP VALUE +30.
		02	SQL-ITERS	PIC S9(9) COMP.
		02	SQL-OFFSET	PIC S9(9) COMP.
		02	SQL-SELERR	PIC S9(4) COMP.
		02	SQL-SQLETY	PIC S9(4) COMP.
		02	SQL-UNUSED	PIC S9(9) COMP.
		02	SQL-CUD		PIC S9(9) COMP.
		02	SQL-SQLEST	PIC S9(9) COMP.
		02	SQL-STMT	PIC S9(9) COMP.
		02	SQL-SQPHSV	PIC S9(9) COMP.
		02	SQL-SQPHSL	PIC S9(9) COMP.
		02	SQL-SQPIND	PIC S9(9) COMP.
		02	SQL-SQPARM	PIC S9(9) COMP.
		02	SQL-SQPARC	PIC S9(9) COMP.
		02	SQL-SQHSTV	PIC S9(9) COMP OCCURS 30 TIMES.
		02	SQL-SQHSTL	PIC S9(9) COMP OCCURS 30 TIMES.
		02 	SQL-SQINDV	PIC S9(9) COMP OCCURS 30 TIMES.
		02	SQL-SQHARM	PIC S9(9) COMP OCCURS 30 TIMES.
		02	SQL-SQHARC	PIC S9(9) COMP OCCURS 30 TIMES.

	01	SQ0001.
		02 FILLER PIC X(907) VALUE "SELECT NVL(CC1_MSTR.CPF,0), NVL(C
	-	"C1_MSTR.BILL,0),NVL(CC1_DEC.NAME,' '),NVL(TO_CHAR,(CC1_DET.DS
	-	"GCD,'00009s'),' '),NVL(TO_CHAR(CC1_DET.PRVBASIC,'00009s'),' 
	-	"'),NVL(TO_CHAR(CC1_DET1.CURBASIC,'00009s'),' '),NVL(TO CHAR (E
	-	"STCD,'9s'),' '),NVL(SEX,' '),NVL(DPTCD,' '),NVL(SCST,' '), NV
	-	"L(TO_CHAR(DACD,'9s'),' '),NVL(TO_CHAR(HRACD,'9s'),' '),NVL (T
	-	"O_CHAR(HRRCD,'9s'),' '),NVL(TO_CHAR(PFCD,'9S'),' '),NVL(CCAC
	-	"D,' '),NVL(TO_CHAR(DSCCD,'9S'),' '),NVL(PENCD,' '),NVL(TO_CH
	-	"AR(OPACD,'9S'),' '),NVL(LOCCD,' '),NVL(COLCD,' '),NVL(QRTNO,
	-	"' '),NVL(CC1_DET.BNKCD,' '),NVL(TO_CHAR(CC1_DET.LEDNO,'009s'
	-	"),' '),NVL(TO_CHAR(CC1_DET.LEDFOL,'009s'),' '),NVL(TO_CHAR(C
	-	"C1_DET.ACCNO,'000009s'),' '),NVL(TO_CHAR(CC1_DET.DOBRTH,'DDM
	-	"MYY'),' '),NVL(TO_CHAR(CC1_DET.DOJOIN,'DDMMYY'),' '),NVL(TO_
	-	"CHAR(CC1_DET.DOSCAL,'DDMMYY'),' '),NVL(TO_CHAR(CC1_DET.DOPOS
	-	"T,'DDMMYY'),' '),NVL(UPDCD,' ')FROM CC1_MSTR,CC1_DET WHERE C
	-	"C1_MSTR.CPF=CC1_DET.CPF            ".

	01	SQL-RUNTIME-VARS.
		02 SQL-IAPXIT-SUCCESS PIC  S9(9) COMP VALUE +0.
		02 SQL-IAPXIT-FAILURE PIC  S9(9) COMP VALUE +1403.
		02 SQL-IAPXIT-FALALERR PIC S9(9) COMP VALUE +535.



While there  are no errors/warnings in the ProCOBOL Precompilation, when we 
submit cc1.cob for compilation, it gives the following error:

$ COBOL/ANSI CC1

155	02	FILLER PIC X(907) VALUE "SELECT NVL(CC1_MSTR.CPF,O........

%COBOL-E-ERROR 164, (1) Nonnumeric literal longer than 256 characters

Though it is a COBOL Error/Warning, the cobol code is generated by Oracle
COBOL Precompiler. The same program was working with the earlier version of 
ProCOBOL without any errors. Unfortunately, I don't have the version no. of
the earlier ProCOBOL version, but it was supplied along with Oracle 7.0.X.

The version that is giving this problem is V1.6.6.0.0.


Thanks in advance



Shyam Marathe
 
                                                                             
T.RTitleUserPersonal
Name
DateLines
1524.1Try this...HGOVC::NANDANThu Mar 13 1997 20:4223
    Shyam,
    
    You would of course be aware that Pro*COBOL precompiles the 
    Pro*COBOL program & then generates COBOL code. Especially for the 
    stuff that is between the EXEC SQL ... and END-EXEC.
    
    From what I recall, the problem is the way COBOL counts the length 
    of the variable, and the length as calculated by the pre-compiler. 
    Again, if I recall correctly, the length differs by just 1. In 
    your case it would be 908. Please try that. You would also need to 
    look at your COBOL manuals to check that this logic is right.
    
    I'm not sure of a fix, but if the the SQL is directly used, you 
    could try using it with a cursor, to see if it is treated more 
    correctly.
    
    For a permanent fix, you would need to report this to Oracle 
    locally.
    
    Hope the above was of help.
    
    Nandan