I have a Variable block , RL (31) input file , this contains 4 fields extracted from some database.All fields are seperated with :
For example please have a look of the given below input file :-
TEST and TEST X are under one field.
Code:
****** ****************************
000001 TEST :TEST X:TEST3 :RRRR
000002 TEST X:TEST6 :TEST7 :RRTT
****** ****************************
I want to 1) insert fixed header & trailer, 2) remove all leading trailing spaces from the fields and 3)in between spaces should be replaced with a %20 .So the output file (FB , RL=26) will look like this .
ICE201I F RECORD TYPE IS V - DATA STARTS IN POSITION 5
ICE150I 0 VLSHRT NOT USED FOR SORT, MERGE, INCLUDE, OMIT OR SUM STATEMENT FIELDS
ICE126A 9 INCONSISTENT REFORMATTING FOR SORTOUT : REASON CODE 05, IFTHEN 0
ICE751I 0 C5-K90014 C6-K90014 C7-K45047 C8-K42136 E9-K40168 E7-K44564
ICE052I 3 END OF DFSORT