I have one PS file in that those fields has COMP3 data. I would like to copy that file information into output PS file but I would like to see the data in character format in output PS file not in COMP-3 format. Could you please suggest me if is there any way to copy the data from input file to output file by changing the COMP3 data to COMP or character format.
You could do the copy via the Sort-Utility. By using masks for the comp3-data you could transform them to numeric data you could read.
Suppose you have input records with numeric values stored in PD format that you want to display or print so they can be easily interpreted. PD values are stored as integers in a compressed internal format that is actually unreadable if you print or display the values.
However, you know that:
The first PD field represents a number with two decimal places.
The second PD field represents a number with three decimal places.
The third PD field represents a date in the form mmddyyyy.
You can use the edit features of the OUTREC statement to display the digits of the PD values as readable characters. Furthermore, you can use the edit features to insert signs, commas, decimal points and hyphens, as appropriate, to make the PD values easy to interpret.
You can use the following OUTREC statement to make the PD values meaningful:
M4 is one of DFSORT's 27 pre-defined edit masks. It edits a numeric field according to the pattern SI,III,III,III,IIT.TT. EDIT=(SI,III,III,IIT.TTT) is a user-defined edit mask. It edits a numeric field according to the pattern SI,III,III,IIT.TTT. EDIT=(TT-TT-TTTT) is another user-defined edit mask. It edits a numeric field according to the pattern TT-TT-TTTT.
For all pre-defined masks have a look at bookmanager / sort.