But got the following error message. Someone please help me
ICE411I 0 THIS IS THE JOINKEYS MAIN TASK FOR JOINING F1 AND F2
ICE416I 0 JOINKEYS IS USING THE F1 SUBTASK FOR INA - SEE JNF1JMSG MESSAGES
ICE416I 1 JOINKEYS IS USING THE F2 SUBTASK FOR INB - SEE JNF2JMSG MESSAGES
ICE419I 0 JOINED RECORDS: TYPE=F, LENGTH=71
ICE201I H RECORD TYPE IS F - DATA STARTS IN POSITION 1
ICE027A 9 END OF OUT FIELD BEYOND MAXIMUM RECORD LENGTH
ICE751I 0 C5-K76982 C6-K90026 C7-K58148 C8-K67572 E9-K60824 E7-K70685
ICE052I 3 END OF DFSORT
Joined: 09 Mar 2011 Posts: 7312 Location: Inside the Matrix
Looking at your Control Cards now, there are three "tasks" for a JOINKEYS operation, one for each of the input files and the "main task". In the main task you can have, effectively, full additional processing of the joined file.
This means your requirement could be served by INREC, or OUTREC as well as OUTFIL.
You are "padding" to 80 bytes by, in you first example 9X, then 7X after the two "-" are inserted.
More reliably, as you don't need to count and change it, you could do that with 80:X, which puts a space in column 80, and pads from the previous end of record to that point, if padding is necessary.