Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Compound Index Keys

Status
Not open for further replies.

carolly

Programmer
Aug 2, 2001
27
AU
I have a file that I need to create and indexed file for but the data is not unique. I have multiple occurances of customer-id, date-hire, time-hire, date-return and time-return. I tried setting up the compound key to be customer-id, date-hire and time-hire which works fine, but when I set the file up to access the indexed file I get an error with 1035-E key is not wholly contained within minumum record length.
 
Can you post the whole program that gives you the error here?
 
IDENTIFICATION DIVISION.

*AUTHOR : CAROL LAYCOCK

*Program to create an indexed file of the sequential file called
*"USER.DAT" with record key of user-id. The indexed file is
*called "USERI.DAT".

ENVIRONMENT DIVISION.

INPUT-OUTPUT SECTION.

FILE-CONTROL.

SELECT USER-FILE ASSIGN TO DISK "A:\USER.DAT"
ORGANIZATION IS LINE SEQUENTIAL.

SELECT USERI-FILE ASSIGN TO DISK "A:\USERI.DAT"
ORGANIZATION IS INDEXED
ACCESS MODE IS DYNAMIC
RECORD KEY IS I-ID.


DATA DIVISION.

FILE SECTION.

FD USER-FILE
LABEL RECORDS ARE STANDARD.
01 USER-RECORD.
05 H-ID PIC X(04).
05 H-DATE.
10 H-DAY PIC 9(02).
10 H-MONTH PIC 9(02).
10 H-YEAR PIC 9(02).
05 H-TIME.
10 H-HOUR PIC 9(02).
10 H-MIN PIC 9(02).
05 R-DATE.
10 R-DAY PIC 9(02).
10 R-MONTH PIC 9(02).
10 R-YEAR PIC 9(02).
05 R-TIME.
10 R-HOUR PIC 9(02).
10 R-MIN PIC 9(02).

FD USERI-FILE
LABEL RECORDS ARE STANDARD.
01 USERI-RECORD.
05 I-ID PIC X(04).
05 I-DATE-HIRE PIC 9(06).
05 I-TIME-HIRE PIC 9(04).
05 I-DATE-RETURN PIC 9(06).
05 I-TIME-RETURN PIC 9(04).

WORKING-STORAGE SECTION.

01 W1-EOC-FILE PIC X(01).
88 EOC-FILE VALUE "T".

01 W-HOLDING PIC X(56).
01 Y-LEAP PIC 9(02).
01 N-LEAP PIC 9(02).
01 INVALID-RECORD PIC 9(02) VALUE ZEROS.


PROCEDURE DIVISION.

MAIN SECTION.

MAIN-A.
DISPLAY ERASE
PERFORM AA-INITIALISE
PERFORM AB-READ-AND-PROCESS UNTIL EOC-FILE.

AA-INITIALISE SECTION.

*Opens files, initialises variables, perform initial read.

AA-ENTRY.

OPEN INPUT
USER-FILE
OUTPUT
USERI-FILE

MOVE "F" TO W1-EOC-FILE

READ USER-FILE
AT END
DISPLAY "ERROR - USER FILE EMPTY"
MOVE "T" TO W1-EOC-FILE
END-READ.

AB-READ-AND-PROCESS SECTION.

* Creates indexed file from sequential file.

AB-ENTRY.
IF H-DATE IS NOT NUMERIC OR
H-DATE = ZEROS OR H-TIME IS NOT NUMERIC OR
H-TIME = ZERO OR R-DATE IS NOT NUMERIC OR
R-DATE = ZERO OR R-TIME IS NOT NUMERIC OR
R-TIME = ZERO
DISPLAY "ERROR"
DISPLAY USER-RECORD
ELSE
PERFORM CHECK-DATE
IF INVALID-RECORD = ZERO
WRITE USERI-RECORD FROM USER-RECORD
INVALID KEY
DISPLAY "ERROR - DUPLICATE RECORD"

END-WRITE
END-IF
END-IF

READ USER-FILE
AT END
MOVE "T" TO W1-EOC-FILE
NOT AT END
MOVE ZERO TO INVALID-RECORD
PERFORM AB-ENTRY
END-READ.

CLOSE USER-FILE USERI-FILE
STOP RUN.

*CHECK HIRE TIME
CHECK-DATE.
IF H-DATE > R-DATE OR H-MIN > 60 OR
H-HOUR > 24 OR H-TIME > 2400 OR H-MONTH > 12 OR
R-MIN > 60 OR R-HOUR > 24 OR R-TIME > 2400 OR
R-MONTH > 12
DISPLAY "ERROR"
MOVE 1 TO INVALID-RECORD
ELSE
PERFORM VALID-DATE-TIME
END-IF.

VALID-DATE-TIME.

IF H-MONTH = (1 OR 3 OR 5 OR 7 OR 10 OR 12) AND
H-DAY > 31 OR H-MONTH = (4 OR 6 OR 9 OR 11) AND
H-DAY > 30
DISPLAY "ERROR"
MOVE 1 TO INVALID-RECORD
END-IF
IF H-MONTH = 2
PERFORM LEAP-YEAR-1
END-IF
IF (R-MONTH = (1 OR 3 OR 5 OR 7 OR 10 OR 12) AND
R-DAY > 31) OR (R-MONTH = (4 OR 6 OR 9 OR 11) AND
R-DAY > 30)
DISPLAY "ERROR"
MOVE 1 TO INVALID-RECORD
END-IF
IF R-MONTH = 2
PERFORM LEAP-YEAR-2
END-IF.

LEAP-YEAR-1.
DIVIDE H-YEAR BY 4 GIVING Y-LEAP REMAINDER N-LEAP
IF N-LEAP = 0 AND H-DAY > 29
DISPLAY "ERROR"
MOVE 1 TO INVALID-RECORD
ELSE
IF N-LEAP NOT = 0
AND H-DAY > 28
DISPLAY "ERROR"
MOVE 1 TO INVALID-RECORD
END-IF
END-IF.

LEAP-YEAR-2.
DIVIDE R-YEAR BY 4 GIVING Y-LEAP REMAINDER N-LEAP
IF N-LEAP NOT = 0
AND R-DAY > 28
DISPLAY "ERROR"
MOVE 1 TO INVALID-RECORD
ELSE
IF N-LEAP NOT = 0
AND R-DAY > 28
DISPLAY "ERROR"
MOVE 1 TO INVALID-RECORD
END-IF
END-IF.

This is the indexed file and now I will add the sub program. I haven't used the linkage section in the sub program yet as I wanted to get it to work first.
IDENTIFICATION DIVISION.

PROGRAM-ID. UPDATE-RECORD.

ENVIRONMENT DIVISION.

INPUT-OUTPUT SECTION.

FILE-CONTROL.

SELECT CUST-FILE ASSIGN TO DISK "A:\CUSTI.DAT"
ORGANIZATION IS INDEXED
ACCESS MODE IS DYNAMIC
RECORD KEY IS CUSTOMER-ID
ALTERNATE KEY IS CUSTOMER-NAME WITH DUPLICATES.

SELECT USER-FILE ASSIGN TO DISK "A:\USERI.DAT"
ORGANIZATION IS INDEXED
ACCESS MODE IS DYNAMIC
RECORD KEY IS USER-ID.



DATA DIVISION.

FILE SECTION.

FD CUST-FILE.
01 CUST-RECORD.
05 CUSTOMER-ID PIC X(04).
05 CUSTOMER-NAME PIC X(15).
05 DISCOUNT-RATE PIC V99.

FD USER-FILE.
01 USER-RECORD.
05 USER-ID PIC X(04).
05 DATE-HIRE.
10 H-DAY PIC 9(02).
10 H-MONTH PIC 9(02).
10 H-YEAR PIC 9(02).
05 TIME-HIRE.
10 H-MIN PIC 9(02).
10 H-HOUR PIC 9(02).
05 DATE-RETURN PIC 9(06).
05 TIME-RETURN PIC 9(04).

*FIELDS TO HOLD TODAYS DATE
01 RUN-DATE.
05 RUN-YEAR PIC 9(02).
05 RUN-MONTH PIC 9(02).
05 RUN-DAY PIC 9(02).


*FIELDS TO HOLD CURRENT TIME
01 RUN-TIME.
05 RUN-HOUR PIC 9(02).
05 RUN-MIN PIC 9(02).

01 D-NAME PIC X(15).
01 D-ID PIC X(04).
01 D-DATE PIC 9(06).
01 D-TIME PIC 9(04).
01 CUST-OPTION PIC X(01).

LINKAGE SECTION.
01 H-DATE-HIRE PIC 9(06).
01 H-TIME-HIRE PIC 9(04).
01 H-DATE-RETURN PIC 9(06).
01 H-TIME-RETURN PIC 9(04).
01 H-CUSTOMER-NAME PIC X(15).
01 H-CUST-ID PIC X(04).

PROCEDURE DIVISION USING H-DATE-HIRE, H-TIME-HIRE,
H-DATE-RETURN, H-TIME-RETURN, H-CUSTOMER-NAME, H-CUST-ID.

MAIN.

INITIALISE.
*OPEN ALL FILES
OPEN INPUT CUST-FILE
OPEN I-O USER-FILE.

AA-NEW-CUSTOMER.
DISPLAY "Would you like to add a new customer Y/N"
ACCEPT CUST-OPTION
IF CUST-OPTION = "Y"
DISPLAY "Enter Customer First Name then Last Name and enter"
ACCEPT D-NAME
MOVE D-NAME TO CUSTOMER-NAME
ACCEPT RUN-DATE FROM DATE
MOVE RUN-YEAR TO H-YEAR
MOVE RUN-MONTH TO H-MONTH
MOVE RUN-DAY TO H-DAY
ACCEPT RUN-TIME FROM TIME
MOVE RUN-HOUR TO H-HOUR
MOVE RUN-MIN TO H-MIN
MOVE ZEROS TO DATE-RETURN
MOVE ZEROS TO TIME-RETURN
ELSE
IF CUST-OPTION = "N"
PERFORM BB-NAME
END-IF
END-IF.

BB-NAME.
DISPLAY "Enter Customer First Name then Last Name and enter"
ACCEPT D-NAME
DISPLAY "Do you wish to delete this customer Y/N"
ACCEPT CUST-OPTION
IF CUST-OPTION = "Y"
PERFORM DELETE-CUSTOMER
ELSE
IF CUST-OPTION = "N"
MOVE D-NAME TO CUSTOMER-NAME
IF D-NAME = SPACES
PERFORM CHECK-ID
ELSE
MOVE D-NAME TO CUSTOMER-NAME
READ CUST-FILE KEY IS CUSTOMER-NAME
INVALID KEY
PERFORM ERROR-RTN-1
NOT INVALID KEY
MOVE CUSTOMER-NAME TO H-CUSTOMER-NAME
END-READ
END-IF.

*CLOSE FILES
CLOSE CUST-FILE
CLOSE USER-FILE

EXIT PROGRAM.
STOP RUN.

ACCEPT-DATE.
ACCEPT RUN-DATE FROM DATE
MOVE RUN-YEAR TO H-YEAR
MOVE RUN-MONTH TO H-MONTH
MOVE RUN-DAY TO H-DAY.

ACCEPT-TIME.
ACCEPT RUN-TIME FROM TIME
MOVE RUN-HOUR TO H-HOUR
MOVE RUN-MIN TO H-MIN.

ERROR-RTN-1.
DISPLAY "File not found"
PERFORM BB-NAME.

CHECK-ID.
DISPLAY "Enter customer ID"
ACCEPT D-ID
MOVE D-ID TO CUSTOMER-ID
READ CUST-FILE KEY IS CUSTOMER-ID
INVALID KEY
PERFORM ERROR-RTN-1
NOT INVALID KEY
MOVE CUSTOMER-ID TO H-CUST-ID
END-READ.

DELETE-CUSTOMER.
MOVE CUSTOMER-ID TO USER-ID
START USER-FILE
KEY = USER-ID
INVALID KEY
DISPLAY "ERROR"
END-START

READ USER-FILE
INVALID KEY
DISPLAY "No Such Record"
NOT INVALID KEY
DELETE USER-FILE RECORD
INVALID KEY
DISPLAY "Delete Error"
END-DELETE
END-READ.

Sorry if this seems a lot to post here but is that what you wanted me to do? Can I set up the compound key with the index file?



 
Thanks!

I think I get it now. When you defined the key like this:

Where H-KEY is the key - you got the strange error message.

When it's split up you don't get the error. The problem is
that your compiler is enforcing a rule that the record has to have something other than just a key -

So to fix this: Add a 02 level after the key - like this:

02 FILLER PIC X.

That should fix you up.


01 USER-RECORD.
02 H-KEY.
05 H-ID PIC X(04).
05 H-DATE.
10 H-DAY PIC 9(02).
10 H-MONTH PIC 9(02).
10 H-YEAR PIC 9(02).
05 H-TIME.
10 H-HOUR PIC 9(02).
10 H-MIN PIC 9(02).
05 R-DATE.
10 R-DAY PIC 9(02).
10 R-MONTH PIC 9(02).
10 R-YEAR PIC 9(02).
05 R-TIME.
10 R-HOUR PIC 9(02).
10 R-MIN PIC 9(02).

 
I tried this and it comes up with the same message. When compiling the Useri file it compiles ok, do I need to do the same thing in that file and each and every sub program I am using to read it maybe?
 
I know the pics have to be the same for the sub programs as what that have to be for the indexed file, but do the names and set up have to be exactly the same also?
 
While none of the names must match, and the "data area" (not key) can be defined differently - the data area must have the same SIZE of key, and that key must be in the same place in the record. The data area must also be of the same size.

For the first program, I suggest using the following - and make sure to change the select to reference this new key:

01 USERI-RECORD.
02 I-KEY.
05 I-ID PIC X(04).
05 I-DATE-HIRE PIC 9(06).
05 I-TIME-HIRE PIC 9(04).
05 I-DATE-RETURN PIC 9(06).
05 I-TIME-RETURN PIC 9(04).
02 FILLER PIC X.

And for the Second:

01 USER-RECORD.
02 USER-KEY.
05 USER-ID PIC X(04).
05 DATE-HIRE.
10 H-DAY PIC 9(02).
10 H-MONTH PIC 9(02).
10 H-YEAR PIC 9(02).
05 TIME-HIRE.
10 H-MIN PIC 9(02).
10 H-HOUR PIC 9(02).
05 DATE-RETURN PIC 9(06).
05 TIME-RETURN PIC 9(04).
02 FILLER PIC X.

Which Compiler are you using?
 
I am using personal Cobol Micro Focus.

I have set the data file like this:
FD USER-FILE.
01 USER-RECORD.
05 H-ID PIC X(04).
05 H-DATE.
10 H-DAY PIC 9(02).
10 H-MONTH PIC 9(02).
10 H-YEAR PIC 9(02).
05 H-TIME.
10 H-HOUR PIC 9(02).
10 H-MIN PIC 9(02).
05 R-DATE.
10 R-DAY PIC 9(02).
10 R-MONTH PIC 9(02).
10 R-YEAR PIC 9(02).
05 R-TIME.
10 R-HOUR PIC 9(02).
10 R-MIN PIC 9(02).

I have set the indexed file like this:
FD USERI-FILE
LABEL RECORDS ARE STANDARD.
01 USERI-RECORD.
05 I-ID-DT.
10 I-ID PIC X(04).
10 I-DATE-HIRE PIC 9(06).
10 I-TIME-HIRE PIC 9(04).
05 I-DATE-RETURN PIC 9(06).
05 I-TIME-RETURN PIC 9(04).
The key is a compound key of I-ID-DT. This compiles fine.
The sub program of SUB-Hire is set up like this:

FD USER-FILE
LABEL RECORDS ARE STANDARD.
01 USER-RECORD.
05 I-ID-DT.
10 I-ID PIC X(04).
10 I-DATE-HIRE PIC 9(06).
10 I-TIME-HIRE PIC 9(04).
05 I-DATE-RETURN PIC 9(06).
05 I-TIME-RETURN PIC 9(04).
with a compound key of I-ID-IT and this still gives me an error message of the same thing.
 

Can you paste in the select statement you have for the user file now, from the program that issues the error?

 
IDENTIFICATION DIVISION.

PROGRAM-ID. SUB-HIRE.

ENVIRONMENT DIVISION.

INPUT-OUTPUT SECTION.

FILE-CONTROL.

SELECT CUST-FILE ASSIGN TO DISK "A:\CUSTI.DAT"
ORGANIZATION IS INDEXED
ACCESS MODE IS DYNAMIC
RECORD KEY IS CUST-ID
ALTERNATE KEY IS I-NAME WITH DUPLICATES.

SELECT USER-FILE ASSIGN TO DISK "A:\USERI.DAT"
ORGANIZATION IS INDEXED
ACCESS MODE IS DYNAMIC
RECORD KEY IS I-ID-DT.


DATA DIVISION.

FILE SECTION.

FD CUST-FILE
LABEL RECORDS ARE STANDARD.
01 CUST-RECORD.
05 CUST-ID PIC X(04).
05 I-NAME PIC X(15).
05 DISCOUNT-RATE PIC V99.


FD USER-FILE
LABEL RECORDS ARE STANDARD.
01 USER-RECORD.
05 I-ID-DT.
10 I-ID PIC X(04).
10 I-DATE-HIRE PIC 9(06).
10 I-TIME-HIRE PIC 9(04).
05 I-DATE-RETURN PIC 9(06).
05 I-TIME-RETURN PIC 9(04).


*FIELDS TO HOLD TODAYS DATE
01 RUN-DATE.
05 RUN-YEAR PIC 9(02).
05 RUN-MONTH PIC 9(02).
05 RUN-DAY PIC 9(02).

*FIELDS TO HOLD CURRENT TIME
01 RUN-TIME.
05 RUN-HOUR PIC 9(02).
05 RUN-MIN PIC 9(02).

01 DATE-HIRE.
05 H-DAY PIC 9(02).
05 H-MONTH PIC 9(02).
05 H-YEAR PIC 9(02).

01 TIME-HIRE.
05 H-HOUR PIC 9(02).
05 H-MIN PIC 9(02).


01 D-NAME PIC X(15).
01 D-ID PIC X(04).
01 D-DATE PIC 9(06).
01 D-TIME PIC 9(04).

WORKING-STORAGE SECTION.
01 W1-EOC-FILE PIC X(01).
88 EOC-FILE VALUE "T".

PROCEDURE DIVISION.

MAIN.

INITIALISE.
*OPEN ALL FILES
OPEN INPUT CUST-FILE
OPEN I-O USER-FILE
MOVE "F" TO W1-EOC-FILE.

AA-NAME.
DISPLAY "Enter Customer First Name then Last Name and enter"
ACCEPT D-NAME
IF D-NAME = SPACES
PERFORM CHECK-ID
ELSE
MOVE D-NAME TO I-NAME
READ CUST-FILE KEY IS I-NAME
INVALID KEY
PERFORM ERROR-RTN-1
NOT INVALID KEY
MOVE I-NAME TO I-NAME
END-READ
END-IF.

BB-DATE.
MOVE CUST-ID TO I-ID
START USER-FILE
KEY = I-ID
INVALID KEY
DISPLAY "ERROR"
END-START

READ USER-FILE NEXT RECORD
AT END
DISPLAY "End of file"
END-READ
DISPLAY "Enter the date of hire DDMMYY or enter 0"
DISPLAY "and the computer will include it for you"
ACCEPT D-DATE
IF D-DATE = 0
PERFORM ACCEPT-DATE
MOVE D-DATE TO I-DATE-HIRE
MOVE ZERO TO I-DATE-RETURN
END-IF.

CC-TIME.
DISPLAY "Enter the time 24 hour format or enter 0"
DISPLAY "and the computer will include it for you"
ACCEPT D-TIME
IF D-TIME = 0
PERFORM ACCEPT-TIME
ELSE
PERFORM VALID-TIME
MOVE D-TIME TO I-TIME-HIRE
MOVE ZERO TO I-TIME-RETURN
END-IF

*CLOSE FILES
WRITE USER-RECORD FROM USER-RECORD
CLOSE CUST-FILE
CLOSE USER-FILE
EXIT PROGRAM.
STOP RUN.

ACCEPT-DATE.
ACCEPT RUN-DATE FROM DATE
MOVE RUN-YEAR TO H-YEAR
MOVE RUN-MONTH TO H-MONTH
MOVE RUN-DAY TO H-DAY
MOVE DATE-HIRE TO I-DATE-HIRE.


ACCEPT-TIME.
ACCEPT RUN-TIME FROM TIME
MOVE RUN-HOUR TO H-HOUR
MOVE RUN-MIN TO H-MIN
MOVE TIME-HIRE TO I-TIME-HIRE.


VALID-DATE.
IF D-DATE IS NOT NUMERIC
OR D-DATE NOT = RUN-DATE
DISPLAY "Incorrect date"
PERFORM BB-DATE
END-IF.

VALID-TIME.
IF D-TIME IS NOT NUMERIC
OR D-TIME NOT = RUN-TIME
DISPLAY "Incorrect time"
PERFORM CC-TIME
END-IF.

ERROR-RTN-1.
DISPLAY "File not found"
PERFORM AA-NAME.

CHECK-ID.
DISPLAY "Enter customer ID"
ACCEPT D-ID
MOVE D-ID TO CUST-ID
READ CUST-FILE KEY IS CUST-ID
INVALID KEY
PERFORM ERROR-RTN-1
NOT INVALID KEY
MOVE CUST-ID TO I-ID
END-READ.


Do you think it is because I am opening the file I-O when I shouldn't be, maybe I need to create a separate output file, would that help?


 
There may be a maximum length for the key, and you may have exceeded that. I don't know if that is OS dependant or it has something to do with the compiler, or if it just does not matter.

It is quite common for a file to have packed key files. If the key was packed pic 9(06) comp-3 and you used pic 9(06), there would be a size variation. Normally packed fields are in odd numbered sizes, because half a byte holds a sign.

If you do not like my post feel free to point out your opinion or my errors.
 
I tried using the two files as input and adding a file for output and that solved the problem. But is there some way that I can open the user-file for I-O without an error. Read the file maybe then close it and open it again I-O. Any help with this would be appreciated.
 
I don't really get it yet! You should be able to open the file I-O using Dynamic access and then be able to write and read at will.
 
Hi,

my standard procedure to handle indexed files:

Code:
000020 IDENTIFICATION DIVISION.
000070 PROGRAM-ID. CAROLLY.
000080 ENVIRONMENT DIVISION.
000090 CONFIGURATION SECTION.
000100 SOURCE-COMPUTER. IBM-PC.
000110 OBJECT-COMPUTER. IBM-PC.
000120 SPECIAL-NAMES.
000130     DECIMAL-POINT IS COMMA.
000140 INPUT-OUTPUT SECTION.
000150 FILE-CONTROL.
000160     SELECT CAROLLY-FILE
000170      ASSIGN          'CAROLLY-FILE'
000180      ORGANIZATION     INDEXED
000190      RECORD           CAROLLY-FILE-KEY-AREA
000200      ALTERNATE RECORD CAROLLY-FILE-ALTKEY-AREA DUPLICATES
000210      ACCESS           DYNAMIC
000220      STATUS           CAROLLY-FILE-STATUS.
000230 DATA DIVISION.
000240 FILE SECTION.
000250 FD  CAROLLY-FILE
000260     LABEL RECORD IS STANDARD.
000270 01  CAROLLY-FILE-RECORD.
000271*   ....
000340 WORKING-STORAGE SECTION.
000341*  ....                                                                   
000350 01  CAROLLY-FILE-STATUS.
000360     03  CAROLLY-FILE-STATUS-X1      PIC X.
000370     03  CAROLLY-FILE-STATUS-X2      PIC X.
000470*  ....                                                                   
000790 PROCEDURE DIVISION.
000800 DECLARATIVES.
000810 DECL01-SECTION SECTION.
000820     USE AFTER STANDARD ERROR PROCEDURE ON CAROLLY-FILE.
000830 DECL01.
000840     IF  CAROLLY-FILE-STATUS-X1 = '9' AND
000850         CAROLLY-FILE-STATUS-X2 NOT = '2'
000860         PERFORM DISPLAY-ERROR-CAROLLY-FILE
000870         STOP RUN
000880     END-IF.
000890 END DECLARATIVES.
000900 MAIN SECTION.
000910 MAI-00.
000911*  .....
001010     PERFORM OPEN-CAROLLY-FILE.
001011*  .....                                                                  
001670 OPEN-CAROLLY-FILE SECTION.
001680     OPEN I-O CAROLLY-FILE.
001690     IF CAROLLY-FILE-STATUS IS NOT EQUAL TO ZERO
001700         OPEN OUTPUT CAROLLY-FILE
001710         PERFORM CHECK-STATUS-CAROLLY-FILE
001720         CLOSE CAROLLY-FILE
001730         PERFORM CHECK-STATUS-CAROLLY-FILE
001740         OPEN I-O CAROLLY-FILE
001750         PERFORM CHECK-STATUS-CAROLLY-FILE
001760     END-IF.
001770 CHECK-STATUS-CAROLLY-FILE SECTION.
001780     IF CAROLLY-FILE-STATUS NOT = ZERO
001790         PERFORM DISPLAY-ERROR-CAROLLY-FILE
001800         STOP RUN.

I hope this helps.

Regards,

Crox

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top