Reformatting Fields In The File


Main Menu        Disk Cleanup Tips        Spyware/Task Lookup        Computer Tips

  Posted by Guest - Reformatting Fields In The File :
Hi,

I have a requirement to reformat a file with fields say A B C to C B A .I tried it with outrec but got the error as inconsistent outrec file.Please suggest me on this.

Guest Says:
outrec is the right way to do it, you are doing something wrong if you are getting errors

Frank Yaeger Says:
I would need to see your DFSORT messages to tell you what you did wrong.  However, an educated guess would be that your input file has RECFM=VB, but you didn't specify the RDW (positions 1-4) in the OUTREC statement.  For a VB file, the first data byte starts at position 5, not position 1.  So for example, if A is in data positions 1-10, B is in data positions 11-20 and C is in data positions 21-30, then for a VB file, you would specify these DFSORT statements to get C B A:

    OPTION COPY
    OUTREC BUILD=(1,4,21,10,11,10,1,10)

If that's not the problem, then you'd have to give more details about your input file's RECFM and LRECL, field positions, etc.

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 www.ibm.com/storage/dfsort


Add your reply below ...



This site allows you to ask questions and get answers from various posters. You may also answer any posts if you feel like you have input to give. Feel free to ask for help with any new question you wish, but most of the questions here are tech related. You will find many questions and answers related to your Ipod or Ipod Nano, Itunes, audio and video converting, spyware or adware cleanup, pc or other computer questions, and even mainframe questions. Although these are the tech questions most often asked, you will find help on almost any computer or software related subject. Feel free to go to the main menu and review the posts already present, or feel free to ask your own question. (Some questions will be closed once the moderator feels they are sufficiently answered and that no other input is needed).

Your Name:

Your Reply:

Type in verification code:


Forum - Front Page

Spyware/Task Database

Computer Tips (Main Page)