Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Reformatting FILEAID to DFSORT outrec

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: Reformatting FILEAID to DFSORT outrec
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 Moderator


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

PostPosted: Wed Aug 22, 2007 1:10 am    Post subject:
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    Post subject: Reply to: Reformatting FILEAID to DFSORT outrec
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 Moderator


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

PostPosted: Wed Aug 22, 2007 1:28 am    Post subject:
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:

www.ibm.com/servers/storage/support/software/sort/mvs/srtmpub.html
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    Post subject: Reply to: Reformatting FILEAID to DFSORT outrec
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 Moderator


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

PostPosted: Wed Aug 22, 2007 3:18 am    Post subject:
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    Post subject: Reply to: Reformatting FILEAID to DFSORT outrec
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    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts outrec field outside range Danielle.Filteau SYNCSORT 10 Sat Mar 04, 2017 2:37 am
No new posts DFSORT MUL FIELDS tspr52 DFSORT/ICETOOL 16 Fri Mar 03, 2017 11:53 pm
No new posts How to get the remainder and quotient... vnktrrd DFSORT/ICETOOL 2 Mon Oct 31, 2016 10:59 am
No new posts SORT- outrec ram_vizag DFSORT/ICETOOL 10 Tue Sep 27, 2016 12:50 am
No new posts Change date (DD/MM/YY) in 2nd record ... uday kiran DFSORT/ICETOOL 12 Wed Sep 07, 2016 10:57 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us