... but an RRDS VSAM dataset with RECSZ=(250,250) is fixed length and I was extending/applying that to KSDS ones too; thanks anyway.

Joel C. Ewing wrote:

Re (a):
The same issue exists for RECSZ=(anynumber,250).  RECSZ=(250,250) does
not define the KSDS as "fixed length":  KSDS VSAM data sets structurally
and by definition always support variable length records.
The average record length in "RECSZ=(250,250)" is informational for
space allocation considerations, it does not mean shorter records cannot
be written.  It may suggest an intent to write all records the same
length, but it could also just indicate the true average is unknown and
the definer wants to guarantee FREESPACE and allocation by records will
handle the worst case.  The only restriction on minimum record size is
that the record must always be large enough to contain the key field. The application writing to the KSDS file may itself impose a single
record size of 250, but it is the application that forces that, not the
definition of the KSDS.

Similarly, a KSDS file could be defined as "RECSZ=(10,250) and in
reality contain nothing but 250 byte records.  VSAM would make incorrect
assumptions for FREESPACE and allocation using RECORDS based on the
average record size value which might be different than desired, but
VSAM only enforces the maximum record size and the presence of the key.
   Joel C. Ewing


On 06/28/2014 02:53 PM, CM Poncelet wrote:
(a) Not if the record is defined as fixed length RECSZ=(250,250) -
because it is then physically written as 250 bytes in the CI and its
RDF will have 250 as its length. But you could define it as variable
length.
(b) You can read only the first 150 bytes of the record by accessing
it directly in the buffer. For that, you should specify
OPTCD=(...,LOC,...) instead of the default OPTCD=(...,MVE,...) in your
RPL. VSAM will then return the address of the record in the CI buffer
(instead of the record itself) in your RPL's specified AREA. Load this
record address into a register (e.g. 'L R4,AREA') and you can then map
your 150 or 200 byte DSECT over the physical 250 byte record with a
"USING <whatever DSECT>,R4". (Note: This might need some tweaking
before it works.)

Ron Thomas wrote:

I needed to know is there any thing we can do for this file so that
doesn't write anything beyond 150 bytes , so that the length of the
record read will be <= 150

Thanks
Ron T



----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to