Need to change a value in a VB file

In this Mainframe Forum - You can post your queries on JCL, OS/390 JCL, MVS JCL, z/OS JCL, JES2 & JES3

Moderators: Frank Yaeger, DikDude, Moderator Group

Post Reply
Cobbhill
Member
Posts: 2
Joined: Wed Feb 22, 2012 12:34 am
Location: Pennsylvania

Need to change a value in a VB file

Post by Cobbhill » Wed Feb 22, 2012 12:47 am

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?
Bob

User avatar
Frank Yaeger
Moderator
Posts: 812
Joined: Sat Feb 18, 2006 5:45 am
Location: San Jose, CA
Contact:

Post by Frank Yaeger » Wed Feb 22, 2012 2:00 am

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'))
Frank Yaeger - DFSORT Development Team (IBM) - yaeger@us.ibm.com
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort

NicC
Active Member
Posts: 650
Joined: Sun Jul 24, 2011 5:27 pm
Location: Down on the pig farm

Post by NicC » Wed Feb 22, 2012 2:01 am

Why not ask in the DFSORT part of the forum?
Regards
Nic

Cobbhill
Member
Posts: 2
Joined: Wed Feb 22, 2012 12:34 am
Location: Pennsylvania

Post by Cobbhill » Wed Feb 22, 2012 2:18 am

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 :)
Bob

Post Reply

FREE TUTORIALS

Tutorials
Free tutorials from mainframegurukul
  • JCL Tutorial
    Covers all important JCL concepts.
  • Cobol Tutorial
    This tutorials covers all Cobol Topics from STRING to COMP-3.
  • DB2 Tutorial
    DB2 Tutorial focuses on DB2 COBOL Programming.
  • SORT Tutorial
    This Tutorial covers all important aspects of DFSORT with examples
  • CICS Tutorial
    This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Interview
Mainframe Interview questions



Other References
Mainframe Tools and others