about WRITE statement



Support for OS/VS COBOL, VS COBOL II, COBOL for OS/390 & VM and Enterprise COBOL for z/OS

about WRITE statement

Postby leon » Sun Dec 07, 2008 9:29 am

question describ as following:
writing a record to a sequential file: write out-record from ws-out-record.
does it need the same size (record length) for out-record and ws-out-record,
if out-record<ws-out-record then what's happen?
if out-record>ws-out-record then wha't happen?
thank you!
leon
 
Posts: 40
Joined: Tue Nov 25, 2008 7:39 pm
Has thanked: 0 time
Been thanked: 0 time

Re: about WRITE statement

 

Re: about WRITE statement

Postby dick scherrer » Sun Dec 07, 2008 9:32 am

Hello,

Technicaly, they do not have to be the same size. Having said that - make them the same size ;)

If they are not the same size either truncation (sending area longer) or blank padding (sending area shorter) will occur.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6304
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 91 times

Re: about WRITE statement

Postby leon » Wed Dec 10, 2008 1:36 am

thank you very much!
leon
 
Posts: 40
Joined: Tue Nov 25, 2008 7:39 pm
Has thanked: 0 time
Been thanked: 0 time

Re: about WRITE statement

Postby dick scherrer » Wed Dec 10, 2008 1:58 am

You're welcome :)

d
User avatar
dick scherrer
Global moderator
 
Posts: 6304
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 91 times


Return to IBM Cobol

 


  • Related topics
    Replies
    Views
    Last post