harisukumaran wrote:Does DFSORT have a way to add a character at the end of each variable length record? Or should I just do this using rexx ?
Assuming that you don't have any embedded spaces and file lrecl=80 , you can use the following the following DFSORT JCL which will give you the desired results
//STEP0100 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=Your input vb file,DISP=SHR
//SORTOUT DD SYSOUT=*
//SYSIN DD *
SORT FIELDS=COPY
INREC BUILD=(1,80,JFY=(SHIFT=LEFT,TRAIL=X'0A'))
//*
If you do have embedded spaces in between and you want to retain them you can code an E15 exit in cobol, assembler and plug it in to DFSORT.