[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [open-cobol-list] Error on index sequential file.
From: |
Bill Klein |
Subject: |
Re: [open-cobol-list] Error on index sequential file. |
Date: |
Thu, 12 Apr 2007 22:00:16 -0500 |
John,
These may be perfectly common extensions, but I am confused by at least
two things in your program.
1) What does the "SEQUENTIAL" in
" ORGANIZATION IS INDEXED SEQUENTIAL
ACCESS IS DYNAMIC"
do (if anything)? Is this supposed to be a variation on just "Indexed"?
2) Is there any chance that you just left out the FD for REFFILE? Again,
some compiler might allow this (as an extension) but it isn't something
that I know about.
I would have expected BOTH of these to be "caught" at compile-time. Without
seeing the FD for REFFILE, it is hard for me to guess what type of
"permanent I/O" error (FS=30) you might be getting.
> -----Original Message-----
> From: address@hidden
> [mailto:address@hidden On
> Behalf Of John R. Culleton
> Sent: Thursday, April 12, 2007 5:41 PM
> To: address@hidden
> Subject: [open-cobol-list] Error on index sequential file.
>
> The enclosed program and a previous program that created an index
> sequential file were compiled and run under Open Cobol. The first one
> ran OK but the second one shown below blew up with a STATUS 30 on the
> second access to the IS file. The first access worked.
>
> I recompiled both programs using Tiny and ran them. (Tiny and OC have
> different IS file layouts.) Both programs executed without error and
> the expected results were achieved.
>
> Here is the error I got from OC
> :libcob: Permanent file error (STATUS=30) File : 'pfbref'
> WARNING - Implicit CLOSE of REFFILE ("pfbref")
> WARNING - Implicit CLOSE of OUTFILE ("pfbfound")
> WARNING - Implicit CLOSE of INFILE ("pdftex.map")
> and here is the program:
>
> 000010 IDENTIFICATION DIVISION.
> 000020 PROGRAM-ID. TEMPLATE.
> 000030 AUTHOR. JOHN CULLETON.
> 000040 INSTALLATION. WEXFORDPRESS
> 000045 Eldersburg MD.
> 000047*SECURITY. Copyright 2006 John R. Culleton, Jr.
> 000050*REMARKS.
> 000060* THIS IS A TEMPLATE FOR OPEN COBOL AND HTCOBL.
> 000070 ENVIRONMENT DIVISION.
> 000080
> 000090 CONFIGURATION SECTION.
> 000100 SOURCE-COMPUTER.
> 000110 Linux.
> 000120 OBJECT-COMPUTER.
> 000230 Linux.
> 000140
> 000150 INPUT-OUTPUT SECTION.
> 000160 FILE-CONTROL.
> SELECT INFILE ASSIGN TO "pdftex.map" ORGANIZATION IS LINE
> SEQUENTIAL.
> SELECT REFFILE ASSIGN TO "pfbref" ORGANIZATION IS
> INDEXED SEQUENTIAL
> ACCESS IS DYNAMIC RECORD KEY IS PFBKEY.
> SELECT OUTFILE ASSIGN TO "pfbfound" ORGANIZATION IS
> INDEXED SEQUENTIAL
> ACCESS IS DYNAMIC RECORD KEY IS TFMKEY.
>
> 000180 DATA DIVISION.
> 000190
> 000200 FILE SECTION.
> 000210 FD INFILE.
> 01 INREC PICTURE X(240).
> FD REFFILE.
> 01 REFREC.
> 02 PFBKEY PICTURE X(40).
> FD OUTFILE.
> 01 OUTREC.
> 02 TFMKEY PICTURE X(40).
> 02 PFBALT PICTURE X(40).
> 02 DESC PICTURE X(240).
>
> 000220 WORKING-STORAGE SECTION.
> 77 END-FILE-FLAG PICTURE X VALUE "N".
> 88 END-FILE VALUE "Y".
> 77 INVALID-FLAG PICTURE X VALUE "N".
> 88 INVALIDD VALUE "Y".
> 01 FIELDS.
> 000230 02 FIELDA PICTURE X(40).
> 02 FIELDB PICTURE X(200).
> 02 FIELDC PICTURE X(40).
> 000240 PROCEDURE DIVISION.
> 000250 001-MAIN-PROCEDURE.
> 000260 OPEN INPUT INFILE OUTPUT OUTFILE I-O REFFILE.
> PERFORM 100-READIT UNTIL END-FILE.
> CLOSE INFILE OUTFILE REFFILE.
> STOP RUN.
> 000270 100-READIT.
> READ INFILE AT END MOVE "Y" TO END-FILE-FLAG.
> IF NOT END-FILE PERFORM 200-RECORD-ANALYSIS.
> 200-RECORD-ANALYSIS.
> MOVE SPACES TO OUTREC FIELDS.
> MOVE "N" TO INVALID-FLAG.
> UNSTRING INREC DELIMITED BY SPACE INTO FIELDA FIELDB.
> UNSTRING INREC DELIMITED BY " <" INTO FIELDB FIELDC.
> * DISPLAY FIELDA FIELDC.
> * ACCEPT INVALID-FLAG.
> MOVE FIELDC TO PFBKEY.
> READ REFFILE INVALID KEY MOVE "Y" TO INVALID-FLAG.
> IF NOT INVALIDD PERFORM 300-WRITE.
> 300-WRITE.
> MOVE FIELDA TO TFMKEY.
> MOVE FIELDC TO PFBALT.
> MOVE INREC TO DESC.
> WRITE OUTREC.
>
>
> Please assume that the left hand spacing was correct in the original.
>
> Any thoughts on why the OC run errored off?
> --
> John Culleton
> Able Indexing and Typesetting
> Precision typesetting (tm) at reasonable cost.
> Satisfaction guaranteed.
> http://wexfordpress.com
>
>
>
> _________________________________________________________________
> Need personalized email and website? Look no further. It's easy
> with Doteasy $0 Web Hosting! Learn more at www.doteasy.com
>
> --------------------------------------------------------------
> -----------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the
> chance to share your
> opinions on IT & business topics through brief surveys-and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge
> &CID=DEVDEV
> _______________________________________________
> open-cobol-list mailing list
> address@hidden
> https://lists.sourceforge.net/lists/listinfo/open-cobol-list
>
- [open-cobol-list] Error on index sequential file., John R. Culleton, 2007/04/12
- Re: [open-cobol-list] Error on index sequential file.,
Bill Klein <=
- [open-cobol-list] Error on index sequential file., Roger While, 2007/04/13
- Re: [open-cobol-list] Error on index sequential file., John R. Culleton, 2007/04/13
- Re: [open-cobol-list] Error on index sequential file., John R. Culleton, 2007/04/13
- [open-cobol-list] Open Call for participation, boscagarda-programming, 2007/04/13
- [open-cobol-list] #OpenCobol on Freenode, boscagarda-programming, 2007/04/13
- Re: [open-cobol-list] #OpenCobol on Freenode, boscagarda-programming, 2007/04/16
- Re: [open-cobol-list] #OpenCobol on Freenode, Bill Klein, 2007/04/16
- Re: [open-cobol-list] #OpenCobol on Freenode, Alain Lucari, 2007/04/16
- Re: [open-cobol-list] #OpenCobol on Freenode, boscagarda-programming, 2007/04/16