Page 1 of 1

Need to change a value in a VB file

Posted: Wed Feb 22, 2012 12:47 am
by Cobbhill
I have a vb file that I need to change a value from "N" to "Y" in position 22 when 1001 is the 7th position. This is without adding the 4bytes for VB.

94007G100R000 YY
94007G1001A00 NN
94007G1001P00 NN
94007G1001000 NN

the file is DCB=(EPIMS.DCB,RECFM=VB,LRECL=16384,BLKSIZE=16388)

Can DFSORT handle this and maintain the VB file format?

Posted: Wed Feb 22, 2012 2:00 am
by Frank Yaeger
You can use DFSORT control statements something like this:

Code: Select all

   OPTION COPY
   INREC IFTHEN=(WHEN=(11,4,CH,EQ,C'1001'),OVERLAY=(26:C'Y'))

Posted: Wed Feb 22, 2012 2:01 am
by NicC
Why not ask in the DFSORT part of the forum?

Posted: Wed Feb 22, 2012 2:18 am
by Cobbhill
Sorry about that, this was my first time using this site.
Thanks Frank, after reading one of your docs you had posted I did this:
OUTFIL IFTHEN=(WHEN=(11,4,CH,EQ,C'1001',AND,26,1,CH,EQ,C'N'),
BUILD=(1,25,C'Y',27,16358)) but your way is easier..Thanks again :)