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 found the problem that I was having was that I opened the user-file I-O and this was causing problems so I used the two files open for input and another file open for output. Is there some way around that I can open the file for I-O without getting that error message. what is the best way to...
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...
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?
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?
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...
what are the rules for index keys - must they all be 01 level data descriptions? I have set them as follows:
01 I-ID-DT.
05 I-ID PIC X(04).
O5 I-DATE PIC 9(06).
05 I-TIME PIC 9(04).
01 R-DATE PIC 9(06).
01 R-TIME PIC 9(04).
THE key is I-ID-DT
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...
I am using an indexed file for a program and the data is set up exactly the same in both but I get an error message of 1035-E Key is not wholly contained within minmum record length. This is the 4th program that is using this inded file and the other 3 are fine. Any ideas?
I have 2 input files to read. The first one CUSTOMER-FILE has 6 records that I can load directly into my 2 dimensional 6 x 4 table. The problem that I am having is loading the data from the USER-FILE into the same table as it has 15 records and some of those records will have the same ID number...
Hey I must be getting better at this I worked it out. I had to change the date to a YYYYMMDD format then use your function and it worked. The time factor was just if time-return > time-hire add 1 to accumulator.
Now I just have to work out the easiest way to validate months i.e.
IF HIRE-MONTH...
Thankyou everyone for your help, I finally worked out what I was doing wrong - so simple. I was trying to add to my data items in the linkage section instead of to an accumulator first then moving the data in later. Anything that is being linked is very touchy.
Now I just have a date and time...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.