Page 2 of 2

Re: File identification and entry

PostPosted: Fri Jun 14, 2013 6:59 pm
by dick scherrer
Hello,

Lots of Stuff, but not what was requested. . .

How was the input file created?

Post a couple of input records in HEX.

Why was the entire source posted?

Re: File identification and entry

PostPosted: Sat Jun 15, 2013 4:55 am
by BillyBoyo
I notice that you are DISPLAYing ENTRADA, not REG-ENTRADA.

As I mentioned before, you are "processing" a record after end-of-file. You also do your DISPLAY before you have read the first record.

You don't seem to fully understand about the use of SECTIONs. It is not good practice, to my mind, to PERFORM a SECTION which contains a STOP RUN. STOP RUN is not such a good way to end a program, particularly as yours is using SQL. GOBACK will be much better. PERFORM the final part, then just GOBACKm outside of the SECTION.

Find out about and use 88s, with EVALUATE TRUE. Avoid "nested" EVALUATEs. Put them into SECTIONs (since you use those) with meaningful names.

Again as I mentioned before, you have no FILE-STATUS checking. You should check after every I/O operation that all was well, It will save you many, many hours over the years.