I have a file which has a detail records and i am extracting the data for a particular field of pic x(16) which contains data+low values. The data in the field is varying for each record. If i do HEX ON i can see hexadecimal values in that. If I open the file in browse mode i can see the data as 123456789-12.....
o/p - i need to write only the data part(123456789-12) in the output file.
As of now i am using the solution as
1.inspect with replacing all low values by spaces
2. using reverse function i am trying to retrieview only the data part but i am failing at the count part.
Can anyone provide me the solution along with the code or explanation.
First of all if you want to keep the same variable and just need to replace low-values by spaces then you don’t need anything but just inspect and if you want to extract the number part and would like to move it to another field then use substring after replacing low-values to spaces.
Please start a new topic for a new question.
When doing so please specify if that is the only space in your data (between fields) or can your actual data contain spaces?
Also show what you have tried. You actually have a possible solution, using substring (reference modification in COBOL terminology), in a previous post in this topic.