Sorry, it is the first day back from a 3 day weekend....

For VL records you need to include the RDW in the INREC statement.  The
statement would be:

  INREC FIELDS=(1,4,C'AAA',5)

The first byte of data is really in position 5 not 1.  The RDW is in
positions 1 through 4.

John


-----Original Message-----
From: IBM Mainframe Discussion List [mailto:[EMAIL PROTECTED] On
Behalf Of Reda, John
Sent: Tuesday, July 05, 2005 10:10 AM
To: [email protected]
Subject: Re: add a a string constant to every record of a file

You can use INREC, OUTREC or OUTFIL OUTREC.  The exact syntax will
depend on whether you are working with FL or VL records.  For FL records
the following INREC statement should do what you want:

  INREC FIELDS=(C'AAA',1,n)    where "n" is the length of the record

For VL records you will need the following INREC statement:

  INREC FIELDS=(C'AAA',1) 

INREC works on the records as they are read in, OUTREC and OUTFIL OUTREC
work on records on the way out.  If you want to use OUTREC simply change
INREC to OUTREC.  If you want OUTFIIL OUTREC change INREC FIELDS to
OUTFIL OUTREC.     

Sincerely,
John Reda
Software Services Manager
Syncsort Inc.

-----Original Message-----
From: IBM Mainframe Discussion List [mailto:[EMAIL PROTECTED] On
Behalf Of Daniel Cremieux
Sent: Tuesday, July 05, 2005 9:47 AM
To: [email protected]
Subject: add a a string constant to every record of a file

Dear all,

How can i do with DFSORT to add a constant to every record of a file ,
please ?

For example :
Before :
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
cccccccccccccccccccccccccccccccccc

After :
AAAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
AAAbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
AAAcccccccccccccccccccccccccccccccccc


Thank you very much

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to