View previous topic :: View next topic
|
Author |
Message |
rally
New User
Joined: 28 Jul 2005 Posts: 37
|
|
|
|
rt. |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
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 |
|
|
rally
New User
Joined: 28 Jul 2005 Posts: 37
|
|
|
|
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 |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
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 |
|
|
rally
New User
Joined: 28 Jul 2005 Posts: 37
|
|
|
|
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 |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
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.
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:
They have to match up. |
|
Back to top |
|
|
|