Would be really thankful if any one gives me an idea to solve the issue. We are getting the file in Character format. The file is VB and Record length 256. The output file should be of variable format with same record length.
If 55 postion is 912 – it is header , 913 – detail and 914 remarks.
Use the following control cards. since you said your indicator starts at pos 55 and your input is a VB file, You need to account for the 4 byte RDW , so the actual position of the indicator is 59. Assuming that the following control cards will give you the desired results. It will convert the 5 bytes at pos 87 (83+4 rdw) to packed decimal format of 3 bytes as s9(5) comp3 is only 3 bytes and 2 spaces and for 913 type I chose randomly pos 94 (90+4 rdw)