Size limits - opening external files in one piece

General development discussion.

Moderators: Susan Smith, admin, Gabriel

Susan Smith
Posts: 693
Joined: Sun Aug 10, 2008 4:24 am
Location: Southern California

Size limits - opening external files in one piece

Postby Susan Smith » Sun Sep 06, 2015 9:55 am

Does anyone know what the current size limit is on the "RECL=" parameter when opening an external file as outin? I have a one-page contract document that is saved in RTF format. It has a lot of text on it with place holders where data fields are substituted before printing. I open the entire file in one piece with RECL= and then make the data substitutions, saving the file. It appears that I can't open a file larger than 32k in one piece. Is that so?

We have increased so many limitations over the years that I thought this one had also been lifted. But perhaps not.

-- Susan

Posts: 313
Joined: Fri Apr 24, 2009 6:02 pm

Re: Size limits - opening external files in one piece

Postby gordon » Sun Sep 06, 2015 11:11 am

By using different values of recl in this string you can test the limit:
    open #10:"name=xxx,recl=32700,replace",e,outin : close #10:
That string can be executed from the command line. That method will show that the maximum record length of 32767 has not changed over the years.

What has changed is the ease of processing short records for when you read a stream file in chunks. As noted in the Wiki:

If the end of a file is encountered before a full record is read, Business Rules generates an incomplete record received (4271) error. Error 4271 can be trapped with an IOERR error condition. In this event, CNT is set to the number of characters read and the record is padded with null values (binary zeroes), but none of the variables in the I/O list will be modified and the file position remains the same. After a 4271 error has occurred, a REREAD may be used to access the padded record. After this REREAD, subsequent reads will produce an end of file error (4270) instead of error 4271.

Return to “General Development”

Who is online

Users browsing this forum: No registered users and 3 guests