You need to show an example of your input records and what you expect for output. "Compare ... and write into out file " does not adquately tell us what you want to do. Write what into the output file? Records from input1 that match input2? Records from input2 that match input1? Records from input1 and input2 that match?
If input1 can have duplicates within it, show that in your example. If input2 can have duplicates within it, show that in your example.
I think I get the idea, but some of your details aren't consistent, so I'm going to have to make some assumptions.
For File1, you say RECORDTYPE= start=12 length =01, but in the example of the File1 records, the RECORDTYPE appears to be in position 10, not in position 12. I'll assume it's in position 10.
For the output file, you show 1-5 and then 5-404, so there's an overlap. I'm going to assume that you want the output records to have the
5-byte ACC-ID in positions 1-5, the 1-byte RECORDTYPE in position 6, and *s for the rest of the record.
Given those assumptions, here's a DFSORT/ICETOOL job that will do what you asked for: