[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference turris::languages

Title:Languages
Notice:Speaking In Tongues
Moderator:TLE::TOKLAS::FELDMAN
Created:Sat Jan 25 1986
Last Modified:Wed May 21 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:394
Total number of notes:2683

180.0. "CDD and variable length records?" by SMAUG::RESNICK (IBM Interconnect Engineering) Tue Apr 26 1988 12:22

    I am working on the DECnet/SNA Data Transfer Facility (DTF).  This
    product essentially does the same thing as FTSV, except that it
    transfers files to/from an IBM MVS system.  In addition to transferring
    data it performs data translation between VAX and IBM 370 data types.
    I'm using the CDD to store information about the record formats and
    data types. 

    I have some questions for the compiler and DATATRIEVE groups about
    their implementations of variable length records in general, and the
    OCCURS...DEPENDING clause in particular.  The question has to do with
    exactly what is written to disk when writing a record containing this
    clause in it's description. 

    My current implementation does not allow for variable length records.
    This decision was based on the information I got from the CRX
    interface. When using this internal interface, the CDD description
    appeared to describe a fixed length record.  However, I have since
    discovered that VAX DATATRIEVE (and a few of the VAX languages) allow
    variable length records as long as the OCCURS...DEPENDING clause is the
    last one in the record.  Other languages ignore the DEPENDING part of
    the clause.  That is, they treat the variable length array as a fixed
    length array (it's size being the maximum length allowed by the
    DEPENDING part of the clause). 

    As DTF is intended to work with files written by utilities and user
    written programs, I need to decide on a design that will take the
    various language implementations into account.  I, therefore, have the
    following questions: 

       How do the different languages handle the OCCURS...DEPENDING
       clause? 

       It looks like I should be allowing variable length records. I
       realize a record should end on a field boundary, but what
       constitutes a valid variable length record?  Specifically: 

          Should a record simply end at a field boundary or should
          the record contain an OCCURS...DEPENDING and end on an
          element boundary? 

          Should a record end at a field boundary in the outermost
          level or can it end on a field boundary within a nested
          structure? 

          Should nested OCCURS...DEPENDING clauses be allowed
          (essentially giving you an array that is variable length in
          two dimensions)?  If so, how should a valid end-of-record
          be determined? 
T.RTitleUserPersonal
Name
DateLines