From: William M. Klein on
Can you show us the source BEFORE the precompiler and compiler get to it?

I was wondering if you have a COPY statement without a full-stop (period) at the
end of it - but from the listing, I am not certain what exactly was submitted to
the (pre)compiler.

--
Bill Klein
wmklein <at> ix.netcom.com
"attraxion" <attraxion(a)gmail.com> wrote in message
news:1166422665.430692.169680(a)n67g2000cwd.googlegroups.com...
> Hi All,
>
> I'm a newbie. I am trying to create a program to extract some entries
> from tables and load some others, using Pro*COBOL. The overall thing
> seems to be all right, but on compiling I am getting a strange one I
> never encountered before -
>
> PCB-S-00400, Encountered the symbol "<end-of-source>" when expecting
> one of the
> following:
>
> + - * / . & id string integer floating-point literal EXTERNAL
> GLOBAL REFERENCE PICTURE USAGE BINARY COMP COMPUTATIONAL
> COMPUTATIONAL-4 ........ etc etc
>
> I STFWed but there is no description of this error anywhere on google.
> The error occurs at a place where I try to include a file containing
> valid values in my program. The excerpt from the list file is as
> follows -
>
> 132 01 SW00-FILE-I-STATUS SYNC PIC X(2)
> 133 *----------------------------------------------------
> 134 * COPY 'filestatus.va'
> 135 *----------------------------------------------------
> 136 88 FS-FILE-STATUS-OK
> Error at line 137, column 29 in file extract_art_image.pco
> 137 VALUE IS "00".
> 137 ............................1
> 137 PCB-S-00400, Encountered the symbol "<end-of-source>" when
> expecting one of the following:
>
> + - * / . & id string integer floating-point literal
> EXTERNAL
> GLOBAL REFERENCE PICTURE USAGE BINARY COMP COMPUTATIONAL
> COMPUTATIONAL-4 COMP-1 COMP-2 COMP-3 COMP-4 COMP-5 COMP-X
> INDEX PACKED-DECIMAL DISPLAY POINTER DISPLAY-1 REDEFINES
> PROCEDURE-POINTER OCCURS SIGN LEADING TRAILING SYNCHRONIZED
> JUSTIFIED BLANK VALUE VARYING THROUGH NEXT START LENGTH AND
> ALL OR
>
> 138 88 FS-CREATED-DUPLICATE-ALT-KEY
> 139 VALUE IS "02".
> 140 88 FS-RECORD-NOT-SIZE-OF-BUFFER
> 141 VALUE IS "04".
> 142 88 FS-OPTIONAL-FILE-NOT-PRESENT
> 143 VALUE IS "05".
>
> Can anyone give me some pointers on why this is happening? The valid
> values file is working okay with other programs.
>
> Thanks a lot in anticipation,
> Best,
> Attraxion.
>


From: attraxion on
Hi, thanks a lot for your replies.

Bill, this is the statement in the *pco file -

*------------------------------------------------------------------------------*
* S W I T C H E S *
*------------------------------------------------------------------------------*

01 SW00-FILE-I-STATUS SYNC COPY 'filestatus.ef'..
COPY 'filestatus.va'.

And here is how it becomes in the listing -

125
*------------------------------------------------------------------------------*
126 * S W I T C H E S
*
127
*------------------------------------------------------------------------------*
128 *----------------------------------------------------
129 * COPY 'filestatus.ef'
130 *----------------------------------------------------
131 01 SW00-FILE-I-STATUS SYNC PIC X(2).
132
133 *----------------------------------------------------
134 * COPY 'filestatus.va'
135 *----------------------------------------------------
136 88 FS-FILE-STATUS-OK
Error at line 137, column 29 in file extract_art_image.pco
137 VALUE IS "00".
137 ............................1
137 PCB-S-00400, Encountered the symbol "<end-of-source>" when
expecting one of the following:

+ - * / . & id string integer floating-point literal
EXTERNAL
GLOBAL REFERENCE PICTURE USAGE BINARY COMP COMPUTATIONAL
COMPUTATIONAL-4 COMP-1 COMP-2 COMP-3 COMP-4 COMP-5 COMP-X
INDEX PACKED-DECIMAL DISPLAY POINTER DISPLAY-1 REDEFINES
PROCEDURE-POINTER OCCURS SIGN LEADING TRAILING SYNCHRONIZED
JUSTIFIED BLANK VALUE VARYING THROUGH NEXT START LENGTH AND
ALL OR

138 88 FS-CREATED-DUPLICATE-ALT-KEY
139 VALUE IS "02".
140 88 FS-RECORD-NOT-SIZE-OF-BUFFER
141 VALUE IS "04".

You will notice that it does not show any error for the subsequent
valid values, only the first one.

Yes Richard, the 29th character is after the full-stop. The 29th and
30th char combo is 0D 0A, and when i view it in the hex-editor it shows
as a dot-dot(..) But i notice that 0D 0A combination is at the end of
almost every line. Can this be the cause of the problem?

Thanks and regards,
Attraxion.

From: Richard on

attraxion wrote:

> 01 SW00-FILE-I-STATUS SYNC COPY 'filestatus.ef'..
> COPY 'filestatus.va'.

> Error at line 137, column 29 in file extract_art_image.pco

> Yes Richard, the 29th character is after the full-stop. The 29th and
> 30th char combo is 0D 0A, and when i view it in the hex-editor it shows
> as a dot-dot(..) But i notice that 0D 0A combination is at the end of
> almost every line. Can this be the cause of the problem?

x"0D0A" is carriage -return line-feed and is standard endofline for a
text file.

It is actually complaining about the file 'extract_art_image.pco'.
Perhaps there is a spurious <end-of-source> character is after the COPY
statement. You have indicated the source for two lines and the
expansion of those, does it carry on ? is there more ? If the listing
has stopped at that point then perhaps it _is_ the end of source.