MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Sort var length temp input file to fixed length output file

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
chirag2901
Beginner


Joined: 19 Apr 2006
Posts: 7
Topics: 4

PostPosted: Thu May 11, 2006 11:09 pm    Post subject: Sort var length temp input file to fixed length output file Reply with quote

Hi,

I am getting a hard time sorting variable length input file to a fixed length output file. I know we need to use VTOF parameter but am not able to get it done with.

My input file has space parameters as : (which is created in Step 1)

Code:
//TMPDD     DD  DSN=&&NDMPRO,DISP=(NEW,PASS,DELETE),   
//              UNIT=SYSDA,SPACE=(CYL,(2,1),RLSE),     
//              DCB=(RECFM=VB,LRECL=4100,BLKSIZE=4104) 


In the second step, the above output file from step 1 becomes the input file an the output file from this step has space parameters as:

Code:
//OUTINT   DD DSN=AOCUY.NDM.PROCESS.INTRMDTE,       
//            DISP=(NEW,CATLG,DELETE),               
//            UNIT=SYSDA,SPACE=(TRK,(4,20),RLSE),   
//            DCB=(RECFM=FB,LRECL=33,BLKSIZE=6930)   


and my sort control card looks something like this :

Code:
OPTION EQUALS                                                   
INCLUDE COND=(3,7,CH,EQ,C'PRC NUM',OR,3,10,CH,EQ,C'OTHER NODE') 
OUTREC FIELDS=(3,33)                                             


I have tried using VTOF parameter, but it's failing. Would appreciate if anybody can specify what exactly I need to give.

Thanks,
Chirag
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12380
Topics: 75
Location: San Jose

PostPosted: Fri May 12, 2006 4:20 am    Post subject: Reply with quote

chirag2901,


I don't see where you used the VTOF parameter. Try these control cards. Also you need to consider the RDW in the first 4 bytes. so if you are looking for something on pos 3 then it is actually at pos 7.

Code:

 OPTION EQUALS
 SORT FIELDS=COPY                                                   
 INCLUDE COND=(7,7,CH,EQ,C'PRC NUM',OR,7,10,CH,EQ,C'OTHER NODE') 
 OUTFIL VTOF,OUTREC=(7,33)


Also note that with sort you never have to mention the DCB parameters.

Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Frank Yaeger
Sort Forum Moderator
Sort Forum Moderator


Joined: 02 Dec 2002
Posts: 1618
Topics: 31
Location: San Jose

PostPosted: Fri May 12, 2006 10:30 am    Post subject: Reply with quote

Chirag,

For more information on using DFSORT's VTOF parameter, see the "VB to FB conversion" Smart DFSORT Trick at:

http://www.ibm.com/servers/storage/support/software/sort/mvs/tricks/
_________________
Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort


Last edited by Frank Yaeger on Mon Sep 04, 2006 11:48 am; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail Visit poster's website
chirag2901
Beginner


Joined: 19 Apr 2006
Posts: 7
Topics: 4

PostPosted: Sun May 14, 2006 10:27 pm    Post subject: Reply with quote

thanks a lot guys. it's working.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group