File def'n-problem with different records layouts
File def'n-problem with different records layouts
This is an old COBOL pgm that I alm trying to change the input file in. However, the program won't accept my multiple file layouts under FD of my input file. Not sure why? Any ideas? This is 1 file with multiple sequential records. There is typically a couple of leading records both with different information, multiple detail records with same information per employee, then trailing record with totals.
-
- Global moderator
- Posts: 3720
- Joined: Sat Dec 19, 2009 8:32 pm
- Skillset: Systems programming, SAS, COBOL, CICS, JCL, SMS, VSAM, etc.
- Referer: other forum
- Location: Dubuque, Iowa, USA
Re: File def'n-problem with different records layouts
What does this even mean? You can have multiple 01 levels under the FD but what are "multiple file layouts"? Other things that would be nice to know:However, the program won't accept my multiple file layouts under FD of my input file
- is the file fixed length or variable length? If variable length, what is the minimum and maximum record lengths and how does COBOL know about them?
- what error messages are you getting -- compile time, presumably, but what is the compiler / computer telling you?
- if the file is fixed length, have you verified that what you are adding are all that same length?
- what version of COBOL are you using?
Re: File def'n-problem with different records layouts
Thank you Robert for responding and nice to meet you. This COBOL version is probably very old, this business went to RPG a long time ago.
This input file has records, 1ST 1 need to capture the data, then next line need parts of the data, then next line repeats itself & need info from each one of those.
This input file is fixed length and I HAVE 3 ‘01’ levels under the FD xxx-file.
01 A-RECORD.
05 FILLER PIC X(94).
01 5-RECORD.
fields . . . FIELD VALUES ADD UP TO 94
01 6-RECORD.
fields . . . FIELDS VALUES ADD UP TO 94
The original pgm has different values in 5-RECORD as it was based on a different input file. I've changed the fields to suit the new file.
I’m running the pgm in debug, break at the reads on this input file. Shows values in A-RECORD & 6-RECORD. But an eval on 5-RECORD says “Identifier does not exist”. I'm lost.
This input file has records, 1ST 1 need to capture the data, then next line need parts of the data, then next line repeats itself & need info from each one of those.
This input file is fixed length and I HAVE 3 ‘01’ levels under the FD xxx-file.
01 A-RECORD.
05 FILLER PIC X(94).
01 5-RECORD.
fields . . . FIELD VALUES ADD UP TO 94
01 6-RECORD.
fields . . . FIELDS VALUES ADD UP TO 94
The original pgm has different values in 5-RECORD as it was based on a different input file. I've changed the fields to suit the new file.
I’m running the pgm in debug, break at the reads on this input file. Shows values in A-RECORD & 6-RECORD. But an eval on 5-RECORD says “Identifier does not exist”. I'm lost.
-
- Similar Topics
- Replies
- Views
- Last post
-
-
Join parts of two records from same file
by Mickes » Thu Apr 27, 2023 3:47 am » in DFSORT/ICETOOL/ICEGENER - 3
- 1189
-
by sergeyken
View the latest post
Sat Apr 29, 2023 1:32 pm
-
-
- 3
- 6694
-
by sergeyken
View the latest post
Sun May 01, 2022 11:26 pm
-
-
Split file, SORT then append records.
by Esmayeelhusen » Fri Aug 04, 2023 6:37 pm » in DFSORT/ICETOOL/ICEGENER - 10
- 4952
-
by Esmayeelhusen
View the latest post
Wed Aug 09, 2023 7:39 am
-
-
-
Process file/records until a specific total is reached.
by chillmo » Thu Mar 24, 2022 6:18 am » in Syncsort/Synctool - 12
- 3705
-
by sergeyken
View the latest post
Wed Mar 30, 2022 10:12 pm
-
-
-
Create multiple records based on one record within a file.
by chillmo » Thu Aug 11, 2022 3:54 am » in Syncsort/Synctool - 5
- 7670
-
by sergeyken
View the latest post
Fri Aug 12, 2022 2:23 am
-