|
At 12:11 PM 09/03/1999 -0400, you wrote: >Can someone give me the jest of how to define 1 physical file with variable >record lengths? I'm thinking we use different record formats. An example >or a manual (and we know how hard it is to find something in a manual) would >be nice. From the book: DDS Reference VARLEN (Variable-Length Field) Keyword Use this field-level keyword to define this field as a variable-length field. Variable-length fields are useful for improving storage when the data for the field typically fits within a certain length, but can occasionally be longer. Specify the maximum length of the field in positions 30 to 34. You can specify the allocated length (or typical length) in the parameter. The format of the keyword is: VARLEN[(allocated-length)] The allocated-length parameter is optional. Use it to specify the number of bytes allocated for the field in the fixed portion of the file. If you do not specify the allocated-length parameter, the data for this field is stored in the variable length portion of the file. Valid values for the allocated-length parameter are 1 to the maximum length of the field specified in positions 30 to 34. The VARLEN keyword has no parameters for a logical file. The VARLEN keyword is valid only on character fields. When you specify the VARLEN keyword, the maximum length you can specify in positions 30 to 34 is 32 740 (32 739 if the field allows the null value). If you specify the DFT keyword for a variable-length field, the length of the default value must be less than or equal to the allocated length for the field. If the default value is longer than the allocated length, an error message is issued when the file is created. If you specify a hexadecimal value as the default value for a variable-length field, the number of hexadecimal characters must be equal to two times the allocated length for the field. The DFT keyword is not allowed on the same field as a VARLEN keyword unless you specify a value for the allocated-length parameter. Do not specify the VARLEN keyword on a date, time, or timestamp field (L, T, or Z in position 35). VARLEN (Variable-Length Field) Keyword--Example Figure 90 shows how to specify the VARLEN keyword for a physical file. Figure 90. Specifying the VARLEN Keyword |...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+. ...8 00010A R RECORD1 00020A FIELD1 100A VARLEN(30) 00030A FIELD2 200A VARLEN A FIELD1 is defined as a variable-length field with a maximum length of 100 and an allocated length of 30. FIELD2 is defined as a variable-length field with a maximum length of 200 and no allocated length. +--------------------------------------------------+ | Please do not send private mail to this address. | | Private mail should go to barsa@ibm.net. | +--------------------------------------------------+ Al Barsa, Jr. - Account for Midrange-L Barsa Consulting, LLC. 400 > 390 Phone: 914-251-1234 Fax: 914-251-9406 http://www.barsaconsulting.com http://www.taatool.com +--- | This is the Midrange System Mailing List! | To submit a new message, send your mail to MIDRANGE-L@midrange.com. | To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com. | To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: david@midrange.com +---
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.