MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

FD entry and layout in it when output file has an ODO clause

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming
View previous topic :: View next topic  
Author Message
aniket
Beginner


Joined: 27 May 2005
Posts: 14
Topics: 8

PostPosted: Tue Sep 26, 2006 3:08 pm    Post subject: FD entry and layout in it when output file has an ODO clause Reply with quote

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
View user's profile Send private message
Cogito-Ergo-Sum
Advanced


Joined: 15 Dec 2002
Posts: 637
Topics: 43
Location: Bengaluru, INDIA

PostPosted: Tue Sep 26, 2006 3:17 pm    Post subject: Reply with quote

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
View user's profile Send private message
aniket
Beginner


Joined: 27 May 2005
Posts: 14
Topics: 8

PostPosted: Tue Sep 26, 2006 3:57 pm    Post subject: Reply with quote

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
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12376
Topics: 75
Location: San Jose

PostPosted: Tue Sep 26, 2006 5:48 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
aniket
Beginner


Joined: 27 May 2005
Posts: 14
Topics: 8

PostPosted: Tue Sep 26, 2006 6:22 pm    Post subject: Reply with quote

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
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12376
Topics: 75
Location: San Jose

PostPosted: Wed Sep 27, 2006 7:39 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
aniket
Beginner


Joined: 27 May 2005
Posts: 14
Topics: 8

PostPosted: Wed Oct 04, 2006 12:50 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group