Line: 1 to 1 | ||||||||
---|---|---|---|---|---|---|---|---|
Added: | ||||||||
> > |
Converting Arrays to Scalar DataAt present, only the 'CNV TEXT' stmt addresses an Alpha array as if it were a single scalar variable. (Unfortunately, it also adjusts for periods, insuring no more than one space after a period.)* initialize an Alpha Array: * SET --- TEMP 1 = CNV TEXT OPT WORK TEST ARRAY 000 = --- TEMP 1You can also accomplish the "Array to Scalar" assignment, by setting up a Working Storage type file, with a GROUP construction like the following: ... then perform the assignment as follows:100 WS GROUP1 GROUP HEADER 1 200 WS A50 ALPHA 1 X(50) 300 WS GROUP1 END GROUP TRAILER 1 400 WS GROUP2 GROUP HEADER 1 500 WS A1 50 ALPHA 1 X(1) Oc 50 600 WS GROUP2 END GROUP TRAILER 1 SET PAT WS A50 = XYZ SET PAT WS GROUP2 = PAT WS GROUP1... resulting in:
Don't forget the ability to search for individual characters (ex: commas or quotes) in ILF code, by means of the IF INCLUDES ('IF' verb with 'IN' operator) Comments:Read what other users have said about this page or add your own comments. |