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
No new posts Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 10 Tue May 16, 2017 2:20 pm
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
No new posts Issue with NDM process to transmit ES... chetanambi All Other Mainframe Topics 6 Wed May 03, 2017 10:52 am
No new posts File processing vishwakotin Mainframe Interview Questions 9 Fri Apr 28, 2017 11:38 am
No new posts Occurrence of various strings within ... TS70363 JCL & VSAM 1 Thu Apr 27, 2017 8:18 pm


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