Michael,

If you are running DFSORT V2R1 it is quite simple to append characters at 
the end of a variable record.  You can simply use the parm VLTRAIL. 
VLTRAIL=string is a new OUTFIL option that allows you to insert a 
character
string (C'string') or hexadecimal string (X'yy...yy') at the end of each 
variable-length OUTFIL output record.

//SYSIN    DD * 
  OPTION COPY 
  OUTFIL VLTRAIL=C'TRAILERTEXT' 
//* 

If you are running an older version of DFSORT that does not support 
VLTRAIL parm then use the following control cards

//SYSIN    DD * 
  OPTION COPY 
  INREC IFTHEN=(WHEN=INIT,OVERLAY=(85:X)), 
  IFTHEN=(WHEN=INIT, 
         BUILD=(1,4,5,80,JFY=(SHIFT=LEFT,TRAIL=C'TRAILERTEXT'))) 
//* 


Further if you have any questions please let me know

Thanks,
Kolusu
DFSORT Development
IBM Corporation

IBM Mainframe Discussion List <[email protected]> wrote on 
10/09/2014 05:47:01 AM:

> From: Michael Klaeschen <[email protected]>
> To: [email protected]
> Date: 10/09/2014 05:47 AM
> Subject: DFSORT append trailing characters to VB records
> Sent by: IBM Mainframe Discussion List <[email protected]>
> 
> Hi!
> 
> We need to append trailing characters to each record of a RECFM=VB 
> data set. DFSORT is almost fine:
>   OUTFIL ...,BUILD=(RDW,5,80,JFY=(SHIFT=LEFT,TRAIL=C'TRAILERTEXT'))
> (RDW is defined as 1,4 in SYMNAMES DD)
> 
> However, sometimes we have blanks at the leftmost part of the 
> records which we must not remove. I tried
>  OUTFIL ...,BUILD=(RDW,5,80,JFY=(SHIFT=NONE,TRAIL=X'TRAILERTEXT'))
> but this does not work as one might guess from the manual.
> 
> I was playing around with BUILD=(RDW,5,X'TRAILINGTEXT') but got 
> X'TRAILINGTEXT' marked as "ICE007A E SYNTAX ERROR". According to 
> manual this should work because form BUILD=(p,m,p,s) is covered by 
> syntax description. But I think from explanation p (second one, here
> the 5) must be last field. So the following separator is not allowed.
> 
> BUILD=(RDW,5,80,X'TRAILINGTEXT'),VLFILL='X40' works fine. But record
> length of 80 is just an example and actual maximum record length 
> might be quite large. Most of records are just a few 
> characters...what a waste.
> 
> From my experience with DFSORT answer will be fascinating simple. 
> But I am not seeing the obvious.
> 
> Thank you, kind regards
> Michael
> 
> ----------------------------------------------------------------------
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to [email protected] with the message: INFO IBM-MAIN
> 

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to