View previous topic :: View next topic |
Author |
Message |
aniket Beginner
Joined: 27 May 2005 Posts: 14 Topics: 8
|
Posted: Tue Sep 26, 2006 3:08 pm Post subject: FD entry and layout in it when output file has an ODO clause |
|
|
Hi,
My output file length is variable. Just to give you an idea, here is the layout of the file in working storage.
01 OUTREC.
05 PART1 PIC X(520)
05 PART2 PIC X(22) OCCURS 0 TO 50 TIMES DEPENDING ON K.
where 'k' is the working storage variable that is popualted during runtime.
I am writing the FD entry below.
RECORDING MODE IS V
RECORD CONTAINS 520 TO 1620 CHARACTERS
BLOCK CONTAINS 0 RECORDS
LABEL RECORDS ARE STANDARD.
01 FD-OUTREC PIC X(1620). 1620 is the max length.
Am I right? please correct me if I am wrong. _________________ Thanks,
Aniket. |
|
Back to top |
|
|
Cogito-Ergo-Sum Advanced
Joined: 15 Dec 2002 Posts: 637 Topics: 43 Location: Bengaluru, INDIA
|
Posted: Tue Sep 26, 2006 3:17 pm Post subject: |
|
|
What happened when you tried ? _________________ ALL opinions are welcome.
Debugging tip:
When you have eliminated all which is impossible, then whatever remains, however improbable, must be the truth.
-- Sherlock Holmes. |
|
Back to top |
|
|
aniket Beginner
Joined: 27 May 2005 Posts: 14 Topics: 8
|
Posted: Tue Sep 26, 2006 3:57 pm Post subject: |
|
|
I am getting following error:
IGYGR1201-E The first integer of the "RECORD CONTAINS" clause for file
was different from the minimum calculated record size 1620. _________________ Thanks,
Aniket. |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12376 Topics: 75 Location: San Jose
|
Posted: Tue Sep 26, 2006 5:48 pm Post subject: |
|
|
aniket,
Try defining as follows
Code: |
RECORD IS VARYING IN SIZE FROM 520 TO 1620 CHARACTERS
|
Hope this helps...
Cheers
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
|
aniket Beginner
Joined: 27 May 2005 Posts: 14 Topics: 8
|
Posted: Tue Sep 26, 2006 6:22 pm Post subject: |
|
|
Thnaks very much Kolusu..it worked.
Can you please tell me what was the difference between two Record Clauses? Both indicate variable file length. _________________ Thanks,
Aniket. |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12376 Topics: 75 Location: San Jose
|
Posted: Wed Sep 27, 2006 7:39 am Post subject: |
|
|
aniket,
You are getting the error becacuse you defined your FD-OUTREC as a fixed string of 1620. Try this definition.
Code: |
FD OUT1FILE
RECORDING MODE IS V
RECORD CONTAINS 520 TO 1620 CHARACTERS
BLOCK CONTAINS 0 RECORDS
LABEL RECORDS ARE STANDARD
DATA RECORD IS FD-OUTREC.
01 FD-OUTREC.
05 PART1 PIC X(520).
05 PART2 PIC X(22) OCCURS 0 TO 50 TIMES DEPENDING ON K.
|
Hope this helps...
Cheers
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
|
aniket Beginner
Joined: 27 May 2005 Posts: 14 Topics: 8
|
Posted: Wed Oct 04, 2006 12:50 pm Post subject: |
|
|
Hi Kolusu,
I appreciate your help.
I would like to know which is the better and technically correct way of defining the above file? The one with 'Record contains' clause or the other- 'Record is varying in size' clause? _________________ Thanks,
Aniket. |
|
Back to top |
|
|
|
|