STRING
COBOL | JAVA |
STRING | cobolString |
Syntax
cobolString ( <target>, <pointer>, new AmtCobolStrParam( <source1> [, <delimiter1>] ) [,new AmtCobolStrParam( <source2> [, <delimiter2>] )] [, ....] )
Parameter(s)
<target>
The receiving variable.
<pointer>
The pointer variable, enter null when not used.
<source1..N>>
The sending variables or literals to move to <target>.
<delimiter1..N> (Optional)
Delimit variables or literals, omitted when delimiting by size.
Example(s)
COBOL | Java |
STRING "FOOD" DELIMITED BY "D" "BAR" DELIMITED BY SIZE INTO A |
cobolString(locDef.a, null, new StrParam("FOOD", "D"), new StrParam("BAR")); |
STRING A DELIMITED BY "-" B DELIMITED BY SIZE INTO C POINTER Z. |
cobolString(locDef.c, locDef.z, new StrParam(locDef.a, "-"), new StrParam(locDef.b)); |
STRING A DELIMITED BY "-" B DELIMITED BY SIZE INTO C OVERFLOW MOVE "True" to overflowstatus NOT overflow MOVE "False" to overflowstatus. |
if (!(cobolString(locDef.c, null, new StrParam(locDef.a, "-"), new StrParam(locDef.b)))) { locDef.overflowstatus.assign("True"); } else { locDef.overflowstatus.assign("False"); } |