IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

DFSORT/ICTOOL can sort VB QSAM to VB VSAM?


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
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
Reply with quote

rt.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


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

PostPosted: Thu Jul 31, 2008 9:41 pm
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
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 Developer


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

PostPosted: Mon Aug 04, 2008 5:33 am
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
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 Developer


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

PostPosted: Tue Aug 05, 2008 5:59 am
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Need to set RC4 through JCL SORT DFSORT/ICETOOL 5
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
No new posts Access to non cataloged VSAM file JCL & VSAM 18
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
Search our Forums:

Back to Top