Record Length - IBM AS400

This is a discussion on Record Length - IBM AS400 ; Our system was designed and written by an outside firm back in the 36 days. I notice that the record length of the files tend to be multiples of 64 -- I'm not sure if this was a performance consideration ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: Record Length

  1. Record Length

    Our system was designed and written by an outside firm back in the 36
    days. I notice that the record length of the files tend to be
    multiples of 64 -- I'm not sure if this was a performance
    consideration or so additional fields could be added later on.

    When I converted us to native, I externalized the files and put in a
    "filler field" for the remaining bytes from the position of the last
    "real field" to keep the length the same as it was when they were
    program described. (This actually made the conversion easier.)

    My question is: If I modify a file to add a field, should I keep the
    length the same (i.e. reduce the size of the "filler field" based on
    the size of the new field), or should I just make the file size be
    whatever the fields are (whether it's 39, 117, etc)? Our system is
    fairly stable, so it's not very often that I have to add fields, but
    just wanted to see if this made a difference in performance.

    Thanks in advance for your help.

    Added note: I looked in the DDS reference on the IBM site -- was there
    another manual that might provide this information?


  2. Re: Record Length

    On Jun 15, 10:05 am, Chipper Miller wrote:
    > Our system was designed and written by an outside firm back in the 36
    > days. I notice that the record length of the files tend to be
    > multiples of 64 -- I'm not sure if this was a performance
    > consideration or so additional fields could be added later on.
    >
    > When I converted us to native, I externalized the files and put in a
    > "filler field" for the remaining bytes from the position of the last
    > "real field" to keep the length the same as it was when they were
    > program described. (This actually made the conversion easier.)
    >
    > My question is: If I modify a file to add a field, should I keep the
    > length the same (i.e. reduce the size of the "filler field" based on
    > the size of the new field), or should I just make the file size be
    > whatever the fields are (whether it's 39, 117, etc)? Our system is
    > fairly stable, so it's not very often that I have to add fields, but
    > just wanted to see if this made a difference in performance.
    >
    > Thanks in advance for your help.
    >
    > Added note: I looked in the DDS reference on the IBM site -- was there
    > another manual that might provide this information?


    The S/36 disk would read disk blocks of 256 bytes at a time. So
    multiples that divide into 256 or multiples of 256 would read better.
    For example, if field length was 63, the 5th record would span blocks
    1 and 2 and require that 2 blocks be read.

    I'm not sure how this affects new systems, but disk read / blocking is
    so fast I can't believe it makes any difference.



  3. Re: Record Length

    On Jun 15, 10:05 am, Chipper Miller wrote:
    > Our system was designed and written by an outside firm back in the 36
    > days. I notice that the record length of the files tend to be
    > multiples of 64 -- I'm not sure if this was a performance
    > consideration or so additional fields could be added later on.
    >
    > When I converted us to native, I externalized the files and put in a
    > "filler field" for the remaining bytes from the position of the last
    > "real field" to keep the length the same as it was when they were
    > program described. (This actually made the conversion easier.)
    >
    > My question is: If I modify a file to add a field, should I keep the
    > length the same (i.e. reduce the size of the "filler field" based on
    > the size of the new field), or should I just make the file size be
    > whatever the fields are (whether it's 39, 117, etc)? Our system is
    > fairly stable, so it's not very often that I have to add fields, but
    > just wanted to see if this made a difference in performance.


    it will not affect performance, but you have to watch out for code in
    your RPG programs which read the file into data structures that are
    hardcoded to an expected size. Also there might be code which
    overrides the the file you are changing to another file, with the RPG
    code making assumptions that the record lengths of a group of files
    will always be the same.

    I would first check that the file you are adding the field to is used
    program described in your RPG code.

    -Steve




+ Reply to Thread