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
 

 

sorting a VSAM file into a VB length flat file

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
prafull

New User


Joined: 08 Dec 2006
Posts: 48

PostPosted: Sat Dec 16, 2006 10:38 am    Post subject: sorting a VSAM file into a VB length flat file
Reply with quote

Hi
Can ne1 explain, in sorting a VSAM file into a VB length flat file,
position we give in SORT FIELDS is actual or it's POSition+4 ?
why?
e.g.
I want to sort VSAM file using it's first 8 bytes, into a new VBL flat file,
wat shud the values in SORT FILEDS ?

SORT FIELDS=(1,8,CH,A)
or
SORT FIELDS=(5,8,CH,A)

Pls justify..
Back to top
View user's profile Send private message

priyesh.agrawal

Senior Member


Joined: 28 Mar 2005
Posts: 1452
Location: Chicago, IL

PostPosted: Sat Dec 16, 2006 11:14 am    Post subject: Re: sorting a VSAM file into a VB length flat file
Reply with quote

Check out... VSAM Processing with DFSORT...
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: Sat Dec 16, 2006 9:50 pm    Post subject:
Reply with quote

prafull,

Priyesh gave the correct DFSORT reference.

To answer your question more directly, for the situation you describe, you would use:

Code:

   RECORD TYPE=V
   SORT FIELDS=(5,8,CH,A)
Back to top
View user's profile Send private message
prafull

New User


Joined: 08 Dec 2006
Posts: 48

PostPosted: Thu Dec 21, 2006 2:18 pm    Post subject:
Reply with quote

I dont see any use of RECORD TYPE=..
the result is same .. u provided RECORD TYPE or not.. wat matters is the position ..+4
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: Thu Dec 21, 2006 9:11 pm    Post subject:
Reply with quote

Quote:
the result is same .. u provided RECORD TYPE or not


Not necessarily. It may be true in your case because of the way your job is coded (for example, if you specified RECFM=VB for SORTOUT), but you didn't show your complete job, so I gave you control statements that would assure your job worked correctly.

If you don't specify RECORD TYPE=V for a VSAM input file, then DFSORT uses a default record type of F or V depending on several factors as described here under TYPE:

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ICE1CA20/3.15?DT=20060615185603

So without RECORD TYPE=V, you may get the correct record type of V by default or you may not as indicated. With RECORD TYPE=V, you will always get the correct record type of V. And yes, with a record type of V, DFSORT prepends an RDW in positions 1-4, so the first data byte starts in position 5 which translates to adding +4 to the data position.
Back to top
View user's profile Send private message
prafull

New User


Joined: 08 Dec 2006
Posts: 48

PostPosted: Fri Dec 22, 2006 11:22 am    Post subject:
Reply with quote

Yes, u r right..
This part skipped from my mind..
Thanks for the info Frank Yaeger!
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
This topic is locked: you cannot edit posts or make replies. Fetching data from BAI File arunsoods JCL & VSAM 1 Wed Jul 19, 2017 4:28 pm
No new posts Write out NODUPS but just from one file Jay Villaverde DFSORT/ICETOOL 8 Fri Jul 14, 2017 12:44 am
No new posts How to add header with Date(YYMMDD) i... Rajan Moorthy DFSORT/ICETOOL 2 Thu Jul 06, 2017 11:44 pm
No new posts How to generate a new unique Input fi... for1ranjith CLIST & REXX 11 Sat Jul 01, 2017 12:09 pm
No new posts Writing a file using online program grvtomar PL/I & Assembler 3 Fri Jun 30, 2017 1:06 pm


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