String Truncating to 255 Characters when Writing to Flat File

NeilShapiro

Member
I am trying to create an NER to write a command string that is made up of several concatenations to a text file for triggering BarTender Label printing. No matter what I try, the string always gets truncated to 255 characters. I tried all of the flat file business functions - write, append, export. I am using a variable, alias DL, length 300, but when I display the length of the data in the variable using MDDebug, the length of the data is always 255. Is there a length limit of string variables in business functions? Thanks for your help.
 
MDDebug truncates it to 255. I am creating a flat file right now with length of 577 with no problem. I HAVE had the problem where I was using MDDebug with arrows <-> instead of -> and MDDebug was truncating my string. Could that be what is happening?

Ben again,
 
Neil,

It has been SO L O N G since I used M&D....

As a generally 'excepted' process, there is no harm in building that string, using Report Variables (RVs).

By using RVs - you can see the syntax of the command, in your PDF. Doing so allows you to review the PDF for the correct syntax.

You can always hide the RV, once the process is working.

(db)
 
The MD_DEBUG.c file looks like it declares the string variables with a length of 250.

JCHAR szStrings[250];

Also on my install SAR 5631856 has been included which increases the length of the math numeric variables and alters the currency variables.

Not sure what the consequences would be in changing the declaration of the string to

JCHAR szStrings[300];

but bear in mind that the short string types are defined as 255 long.

Thanks
Aidy
 
Back
Top