07-19-2017 08:25 AM
I am trying to take a period out of variable that looks like this: 03.17. My desired output would look like this: 0317.
I am getting the following error message.
"WARNING: In a call to the CAT function, the buffer allocated for the result was not long enough to contain the concatenation of all
the arguments. The correct result would contain 120 characters, but the actual result might either be truncated to 4
character(s) or be completely blank, depending on the calling environment. The following note indicates the left-most
argument that caused truncation.
NOTE: Argument 1 to function CAT at line 30 column 12 is invalid."
What I am doing wrong?
length specialty $4;
07-19-2017 08:33 AM
A few minor issues.
First, the length of FIRST and SECOND is not $2. Rather, they have the same length as DZP_DBC_SPECIALISME.
Second, the CAT function does not remove leading and trailing blanks (although CATS would do that).
So that's why the incoming strings won't fit into 4 characters.
Superseding all of this, why not just use the simple method:
specialty = compress(DZP_DBC_SPECIALISME, '.');
Need further help from the community? Please ask a new question.