A S/36 file has fields named Fnnnn for non-key fields and Knnnn for the key
field.

A have used the method of replacing the file with an identical DDS created
file (look out for gaps in the original S/36 definition) if the file has
only one record format. If all is identical (including key field) all S/36
environment programs can access the file and it is easy as pie to create new
modern programs using the same.

For files with multiple record format (usually something like an order file
with header, address and item records in the same file) I create a template
file for each format and (in RPG) do something like this (using SQL):

Dcl-DS DSfile extname('B.XXXXXX') qualified end-ds;
Dcl-S FilePtr pointer inz(%addr(DsFile));
Dcl-DS DSHead extname('HEADERFMT') qualified based(fileptr) end-ds;
Dcl-DS DSAddr extname('ADDRFMT') qualified based(fileptr) end-ds;
Dcl-DS DSLine extname('LINEFMT') qualified based(fileptr) end-ds;

When accessing the file test on value of (typically) record type variable to
determine which ds to use.




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2026 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.