青春期生理教育课:COBOL-ERROR & ABEND

来源:百度文库 编辑:偶看新闻 时间:2024/04/28 06:15:59
1.File stauts-41
receive a file status 41 'WHEN YOUR PROGRAM ATTEMPTS TO OPEN A FILE WHICH IS ALREADY OPEN'
Your program, as suggested in the other forum, is somehow looping.
find the logic failure. suggest using displays. Do you maintain counts in your program? see how many records where read. Do you have a routine to handle End of File? Does it close the file? Obviously your program did not CLOSE the file. Short of looking at your program logic (which I won't do), don't have any other suggestions beyond using displays if you don't have access to a Step-thru Debugger like Intertest or xpeditor.
2.  0C4
The system detected a protection exception (System Completion Code=0C4)
Error- file closed but want to write
CLOSE UPLD-TABFIL  RPTLOG-FILE
WRITE  RPTLOG-RECORD FROM  RPT-SUMMARY-LINE1
Resoluation: put close behend  write
3.sql code -181
-181  Bad data in Date/Time/Timestamp.
Error-  insert a field which is time.   Move space to it.
Resolution- can't not be  space when it is time type.   Move '10.30.01' to it
4.S0C7
A file attribute mismatch was detected.-file length mismatch
5. unusable host variable
error-
05  WS-TEMP-DATE4.
10 WS-TEMP-DATE4-CCYY     PIC X(4).
10 FILLER                 PIC X(1) VALUE '-'.
10 WS-TEMP-DATE4-MM       PIC X(2).
10 FILLER                 PIC X(1) VALUE '-'.
10 WS-TEMP-DATE4-DD       PIC X(2).
EXEC SQL
UPDATE ISGB_SYSTEM_PARM
SET CAMP_YEAR_END_DATE = :WS-TEMP-DATE4
WHERE SYSTEM_CODE = 10 AND FK_BZ_ID = 45
END-EXEC.
Resolution-
a.define extra variable- 05  WS-TEMP-DATE5 PIC X(10)
b. MOVE WS-TEMP-DATE4 TO WS-TEMP-DATE5
c. USING WS-TEMP-DATE5 as host variable  in update statement
6. VB file FD definition
FD  UPLD-ISBR-FILE
LABEL RECORDS STANDARD
BLOCK CONTAINS 0 RECORDS
RECORDING MODE V.
01  UPLD-INREC1       PIC X(251).  Max length->in jcl DEFINE V(255) more 4 byte
01  UPLD-INREC2       PIC X(010).  Min length