Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I set maximum input record length?

Status
Not open for further replies.

66camero

MIS
Aug 17, 2010
3
0
0
US
I'm really new to Perl and getting this error, 'Input record exceeds maximum length. Specify larger maximum.', after adding new fields to an inbound field. Is there an easy solution to this problem? I'm not finding much information in the Perl manual on fixing this problem. Thank you for any help you can provide.
 
That doesn't sound like a Perl limitation, but rather one that has been implemented in the script or modules that you are running.

What exactly have you added more fields to, the script or an input file, or something else?

Annihilannic.
 
Additional fields where added to the input file (varible length containing multiple records of different data). I've added them to the unpack definition but let me check other sections of the program. It is also doing a sort so that may be where the problem lies. I'll post another update once I've looked at the sorting routine. Thank you for the response.
 
The problem is with DOS sort, that is being called from the Perl program using the system command. DOS sort has a record limit default of 4096 bytes and errors when that is exceeded without specifying a new record length with /rec switch. Here is an example of how to set that option...

@args = ("sort", "/rec", "5000", "$inputDATA", "/o" , "$outputDATA");

unless(system(@args) == 0)

Thank you for helping with this issue.
 
It's unnecessary to use an external sort facility when Perl has one built-in.

Annihilannic.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top