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
 

 

DFSORT/ICTOOL can sort VB QSAM to VB VSAM?

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

New User


Joined: 28 Jul 2005
Posts: 37

PostPosted: Thu Jul 31, 2008 9:38 pm    Post subject: DFSORT/ICTOOL can sort VB QSAM to VB VSAM?
Reply with quote

rt.
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 Jul 31, 2008 9:41 pm    Post subject:
Reply with quote

Yes. Just use:

Code:

   RECORD TYPE=V
   SORT FIELDS=(p,m,s,a)


Remember to account for the RDW (positions 1-4) when determining the starting position (p).
Back to top
View user's profile Send private message
rally

New User


Joined: 28 Jul 2005
Posts: 37

PostPosted: Mon Aug 04, 2008 3:43 am    Post subject:
Reply with quote

Hi Frank,

I have some concern, due to the RDW can not be seen in VB QSAM file,
When we sort VB QSAM to VB VSAM file, the RDW part can be written to VSAM 1st 4 bytes ?

I have tried above suggestion, but got L(12) error.
from the manual, it says the input file is not in sequence, I can confirm
the record already sorted by the Key.

Any idea?
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: Mon Aug 04, 2008 5:33 am    Post subject:
Reply with quote

Rally,

I said:

Quote:
Remember to account for the RDW (positions 1-4) when determining the starting position (p).


You said:

Quote:
I have tried above suggestion, but got L(12) error.
from the manual, it says the input file is not in sequence, I can confirm
the record already sorted by the Key.


If the records are sorted by the key, but you got an "input file is not in sequence error", then you didn't specify the key correctly in the SORT statement. My first guess would be that you didn't account for the RDW when determining the starting position. Try adding 4 to the starting position. If that doesn't work, you'll have to supply more information about how the VSAM file is defined, the SORT statement you used, etc before we can help any further.

Quote:
When we sort VB QSAM to VB VSAM file, the RDW part can be written to VSAM 1st 4 bytes ?


I'm not sure what you're asking here. Are you asking if DFSORT normally writes the RDW to the VSAM records or the RDW can be written or not written to the VSAM record?
Back to top
View user's profile Send private message
rally

New User


Joined: 28 Jul 2005
Posts: 37

PostPosted: Tue Aug 05, 2008 4:40 am    Post subject:
Reply with quote

The key parameter for VSAM define is :

Code:

RECSZ(200 803)   
KEYS(20 4)   


The QSAM also with max Len 803 (include RDW).

The SORT parameter is
Code:

RECORD TYPE=V           
SORT FIELDS=(5,20,CH,A) 
OPTION VLSHRT


I got below error message :
ICE077A 0 VSAM OUTPUT ERROR L(12) SORTOUT


I am asking if DFSORT normally writes the RDW to the VSAM records.
we can not see the RDW in QSAM file.

As per my experiecen, we will include the RDW part from VSAM file to QSAM if we sort the VB VSAM TO VB QSAM.
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: Tue Aug 05, 2008 5:59 am    Post subject:
Reply with quote

No, DFSORT does NOT write the RDW in the VSAM output file. VSAM records do not have a concept of an RDW - they store the record length "outside" the record.

I believe you have a mismatch between your KEYS parameter and your SORT parameters.

Quote:
KEYS(20 4)


This defines the key as starting at position 5 in the VSAM file, so that would be position 9 in the QSAM file when you account for the RDW.

Code:

   SORT FIELDS=(5,20,CH,A) 


This defines the key as starting in the first data byte (after the RDW) which does NOT match the KEYS(20 4) definition which says that the key starts in the fifth data byte.

If your QSAM VB file has the key in the fifth data byte, then you need this SORT statement:

Code:

   SORT FIELDS=(9,20,CH,A) 


If your QSAM VB file has the key in the first data byte, then you need this KEYS parameter:

Code:

KEYS(20 0)


They have to match up.
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 how to recover an uncataloged VSAM da... archanamuthukrishnan All Other Mainframe Topics 3 Wed Jan 11, 2017 6:18 pm
No new posts Underlying DB2 VSAM LDS - SMF recording vasanthz All Other Mainframe Topics 6 Thu Jan 05, 2017 4:20 am
No new posts Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts BWO option in VSAM blayek CICS 3 Sat Nov 05, 2016 10:47 am


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