I need to get an output file which have matching Field 1 and then need to add a character field X(02) whose constant value is CD.
I am doing it through Joinkeys which will match the records and put them in the third file.
You cannot use 6:2C'CD' in the REFORMAT statement. The syntax for REFORMAT is F1:p,m to include fields from file F1 and/or F2:p,m to include fields from F2. However, once you've used REFORMAT to create the joined record, you can use INREC, OUTREC or OUTFIL to further format it, e.g.