IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Reformatting FILEAID to DFSORT outrec


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
ant1271

New User


Joined: 19 Apr 2007
Posts: 9
Location: Richmond

PostPosted: Wed Aug 22, 2007 12:34 am
Reply with quote

i need to convert this particular piece of code using sort utility. i am facing problem in understanding outrec control statement with respect to this. Kindly explain how cani use outrec control statement here?


//KEYAPEN EXEC PGM=FILEAID,REGION=4096K
//*STEPLIB DD DSN=MVSPP.FA.V8R8M1.LOAD,DISP=SHR
//SYSPRINT DD SYSOUT=*
//SYSLIST DD SYSOUT=*
//DD01 DD DSN=UTU2.REPORT.BASEF1P,DISP=OLD
//DD01O DD DSN=UTU2.BASEF1P.LOAD.DATA,DISP=MOD
$$DD01 USER RDW=3,MOVE=(1,80C' '),
MOVE=(1,6,8),MOVE=(7,40,29),MOVE=(47,6,216),
MOVE=(53,2,469),MOVE=(55,4,944),MOVE=(59,3,948),
MOVE=(62,1,992),MOVE=(63,6,589),MOVE=(69,4,452),
WRITE=DD01O
//
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Wed Aug 22, 2007 1:10 am
Reply with quote

What is the RECFM and LRECL of your DD01 data set? Is it VB?
What is the RECFM and LRECL of your DD01O data set? Is it VB or FB?

I don't know the FileAid language so I don't know how to interpret these FileAid statements.

What does RDW=3 mean? I googled it and it found "field offset starts at 1". Does that mean position 5 after the RDW is actually referred to as 1 rather than 5, or does it mean something else?

MOVE=(1,6,8),MOVE=(7,40,29), etc - I googled this and found that it is equivalent to 1:8,6,7:,29,40,etc. But I don't know if position 8 counts the RDW (in which case 8 is right) or doesn't count the RDW (in which case position 12 would be right).

Assuming that you're trying to convert from VB to FB/80 and your input positions do not count the RDW, the DFSORT job would be something like this:

Code:

//S1 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=UTU2.REPORT.BASEF1P,DISP=OLD
//SORTOUT DD DSN=UTU2.BASEF1P.LOAD.DATA,DISP=MOD
//SYSIN DD *
   OPTION COPY
   OUTFIL VTOF,
      BUILD=(1:12,6,7:33,40,47:220,6,
        53:473,2,55:948,4,59:952,3,
        62:996,1,63:593,6,69:456,4,80:X)


If that's not what you're trying to do, then explain in more detail what you are trying to do.
Back to top
View user's profile Send private message
ant1271

New User


Joined: 19 Apr 2007
Posts: 9
Location: Richmond

PostPosted: Wed Aug 22, 2007 1:20 am
Reply with quote

Both the files are FB. i am trying to select few needed fields from the file and copy only those selected onto another file so as to load them into db2. hence this excercise. this was working fine until my org decided to do away with fileaid.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Wed Aug 22, 2007 1:28 am
Reply with quote

Quote:
Both the files are FB


Oh, the RDW=3 fooled me. If both files are FB, then this DFSORT job should work:

Code:

//S1 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=UTU2.REPORT.BASEF1P,DISP=OLD
//SORTOUT DD DSN=UTU2.BASEF1P.LOAD.DATA,DISP=MOD
//SYSIN DD *
   OPTION COPY
   OUTREC BUILD=(1:8,6,7:29,40,47:216,6,
        53:469,2,55:944,4,59:948,3,
        62:992,1,63:589,6,69:452,4,80:X)
/*


If you're not familiar with DFSORT and DFSORT's ICETOOL, I'd suggest reading through "z/OS DFSORT: Getting Started". It's an excellent tutorial, with lots of examples, that will show you how to use DFSORT, DFSORT's ICETOOL and DFSORT Symbols. You can access it online, along with all of the other DFSORT books, from:

Use [URL] BBCode for External Links
Back to top
View user's profile Send private message
ant1271

New User


Joined: 19 Apr 2007
Posts: 9
Location: Richmond

PostPosted: Wed Aug 22, 2007 1:44 am
Reply with quote

kindly excuse me. i just now figured out that my input file is VB DCB=(LRECL=1277,RECFM=VB,BLKSIZE=0). and my output file has to be a fb with only selected fields.

i apologize for being late with this information.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Wed Aug 22, 2007 3:18 am
Reply with quote

Ok, then go back to my original post where I assumed that's what you wanted.
Back to top
View user's profile Send private message
ant1271

New User


Joined: 19 Apr 2007
Posts: 9
Location: Richmond

PostPosted: Wed Aug 22, 2007 6:56 pm
Reply with quote

thank you so much it worked out pretty well. I will take your advice on learning more about dfsort. thanks again ..
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
No new posts Search two or more word with FILEAID Compuware & Other Tools 15
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
No new posts DFsort help with SUM() DFSORT/ICETOOL 12
Search our Forums:

Back to Top