SiouxCityElvis
Programmer
I am trying to figure out how to go about putting a table of errors into a field for output.
My errors Working Storage table is:
I use the STRING on other message out subroutines, but I am wondering if I can do that with the Table of errors above. I want to store the string of errors in one huge string delimited by "^" between each error.
example:
WS-STRING-OUT would be populated with
"pin error^signon error^idiot error^......^etc"
My guess would be:
I'm going to try this, but have doubts that using the WS-CUST-ERRORS field will work. My guess is that WS-CUST-ERROR with and index will need to be used, but I'm wondering how to iterate through all indexed errors, and string them all into one field.
Thanks.
-David
My errors Working Storage table is:
Code:
01 WS-STRING-OUT PIC X(1000).
01 STRING-IDX PIC 999 VALUE 0.
01 WS-ERROR-IDX PIC 999 VALUE 0.
01 WS-CUST-ERROR-TABLE.
03 WS-CUST-ERRORS OCCURS 999 TIMES.
05 WS-CUST-ERROR PIC X(15).
05 WS-CUST-DELIMITER PIC X(1) VALUE "^".
I use the STRING on other message out subroutines, but I am wondering if I can do that with the Table of errors above. I want to store the string of errors in one huge string delimited by "^" between each error.
example:
WS-STRING-OUT would be populated with
"pin error^signon error^idiot error^......^etc"
My guess would be:
Code:
STRING WS-CUST-ERRORS DELIMITED BY SIZE
INTO WS-STRING-OUT
END-STRING
I'm going to try this, but have doubts that using the WS-CUST-ERRORS field will work. My guess is that WS-CUST-ERROR with and index will need to be used, but I'm wondering how to iterate through all indexed errors, and string them all into one field.
Thanks.
-David