vsam sort with type=f



IBM's flagship sort product DFSORT for sorting, merging, copying, data manipulation and reporting. Includes ICETOOL and ICEGENER

vsam sort with type=f

Postby maaike c » Wed Sep 03, 2008 12:20 pm

We’re having problems with fixed/variable blocked files. After the definitions of the 2 VSAM’s you can find a sort-step as used in our JCL. Our question: What can be the impact of omitting the RECORD TYPE=F,LENGTH=(229) options in the sort-step? What is the impact on the files and on the way they are to be processed in a COBOL-program?


DEFINE CLUSTER -
(NAME(TEST.MLI.BRPTOTAL.WRITER.DATA) -
CYL(1 1) -
NONINDEXED -
SPEED ) -
DATA -
(NAME(TEST.MLI.BRPTOTAL.WRITER.DATA.DATA) -
RECORDSIZE (229 229) -
CISZ (4096))


DEFINE CLUSTER -
(NAME(TEST.MLI.BRPTOTAL.WRITER.CENTRPR) -
TRK(300 15) -
CISZ(4096) -
NONINDEXED -
RECSZ(229 229) -
FREESPACE(0 0) -
SPEED) -
DATA -
(NAME(TEST.MLI.BRPTOTAL.WRITER.CENTRPR.DATA))


//SRTTOT1 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=TEST.MLI.BRPTOTAL.WRITER.DATA,DISP=(SHR)
//SORTOUT DD DSN=TEST.MLI.BRPTOTAL.WRITER.CENTRPR,DISP=(SHR)
//SORTLIB DD DSN=SYS1.SORTLIB,DISP=SHR
//SYSIN DD *
SORT FIELDS=(1,77,CH,A),NOEQUALS
INCLUDE COND=(34,32,CH,EQ,C'00000000000000000000000000000000')
SUM FIELDS=NONE
OPTION FILSZ=E20000
RECORD TYPE=F,LENGTH=(229)
/*

8-)
maaike c
 
Posts: 4
Joined: Wed Apr 16, 2008 2:28 pm
Has thanked: 0 time
Been thanked: 0 time

Re: vsam sort with type=f

Postby dick scherrer » Wed Sep 03, 2008 10:17 pm

Hello,

We’re having problems with fixed/variable blocked files.
What are the problems?

What can be the impact of omitting the RECORD TYPE=F,LENGTH=(229) options in the sort-step? What is the impact on the files and on the way they are to be processed in a COBOL-program?
Did you try this both ways? What happened?

Which sort product are you using? If you are not sure, look at the top of the information created by an execution of the sort. It will tell you which product and which release of that product.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: vsam sort with type=f

Postby maaike c » Thu Sep 04, 2008 1:07 pm

WHAT HAPPENED?
When we ran the jcl with the options specified (type,length) , we received a file-status 34 meaning:

The I/O statement failed because of a boundary violation.

This condition indicates that an attempt has been made to write beyond

the externally defined boundaries of a sequential file.


We got this message when trying to write to file TEST.MLI.BRPTOTAL.WRITER.CENTRPR. This file was opened for extend, access sequential, organization sequential.

When submitting the job without the mentioned options specified, no error occured.


WHICH SORT PRODUCT?
CONTROL STATEMENTS FOR 5694-A01, Z/OS DFSORT V1R5
maaike c
 
Posts: 4
Joined: Wed Apr 16, 2008 2:28 pm
Has thanked: 0 time
Been thanked: 0 time

Re: vsam sort with type=f

Postby Frank Yaeger » Thu Sep 04, 2008 10:31 pm

What can be the impact of omitting the RECORD TYPE=F,LENGTH=(229) options in the sort-step?


When you specify

   RECORD TYPE=F,LENGTH=229


DFSORT processes the VSAM input data set as fixed length (F). DFSORT will obtain the length of 229 automatically so LENGTH=229 isn't needed.

When you don't specify the RECORD TYPE and the input and output files are VSAM, DFSORT processes the VSAM input data set as variable length (V).

Your DEFINEs appear to set up fixed-length records of 229 bytes. I duplicated your VSAM data sets and DFSORT job as closely as I could and loaded the VSAM input file with 229 byte records and it worked fine with RECORD TYPE=F. I don't know why you're getting the error you're getting with RECORD TYPE=F. Note that a VSAM file can always be processed as variable length (V) - you just have to be careful to add 4 to the starting position of each field you use. A VSAM file can be processed as fixed length (F) if the records are all the same length. Perhaps your VSAM data set was not loaded with fixed-length records correctly.

For more information on processing VSAM files with DFSORT, see:

http://publibz.boulder.ibm.com/cgi-bin/ ... 5603&CASE=
Frank Yaeger - DFSORT Development Team (IBM) - yaeger@us.ibm.com
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort
User avatar
Frank Yaeger
Global moderator
 
Posts: 1079
Joined: Sat Jun 09, 2007 8:44 pm
Has thanked: 0 time
Been thanked: 15 times


Return to DFSORT/ICETOOL/ICEGENER

 


  • Related topics
    Replies
    Views
    Last post