I have a table created with one of the fields define as:
But I read that- The maximum length for a string variable to be passed on to SAS is 200 characters. Does this mean that my variable LGC_DE will nt hold more than 200 characters?
A character variable is a variable whose value contains letters, numbers, and special characters, and whose length can be from 1 to 32,767 characters long.
If you need to be sure that your character variable comes across as a larger length, then use an explicit LENGTH statement:
length longchar $1024;
There are some instances, however, where the length of a character variable is set based on interface restrictions, such as this restriction when reading from Excel: http://support.sas.com/kb/19/409.html
You may need to open a track with Tech Support if you find that you have issues with the length of your character variable.
No, the maximum length of a string is 32767. But, consider this example of the CATX function and the use of the concatenate operator (||). By default, the concatenate operator creates the new variable with a length equal to all the concatenated pieces, while the CATX function uses a length of $200.
If you want to ENSURE a length for your character variable, up to the maximum allowable length, then use the LENGTH statement, as shown in the code below.