Question : Data Structure

How do I find out what the Data Structure is doing? Is there a way to find the file INFORM to see what it is doing? The INFORM DS creates a line number. This line number allows users to see the line number and find exactly what they want but when I had to change the program to a specific year the line number restarted from 1. I want to be able to keep the line number the same as the orginal document but I need to find out more about this DS INFORM. Any help will be greatly helpful. Thanks.

0004.00      FCDLF    UF  E           K        DISK         KINFDS INFORM
0005.00      FQSYSPRT O   F     132     OF    LPRINTER                    
0006.00      LQSYSPRT 066FL055OL                                          
0007.00      IINFORM      DS                                              
0008.00      I                                    B 397 4000NUMBR        

Answer : Data Structure

INFORM is being used as a File Information Data Structure (INFDS) for the DISK file CDLF.  

Line 4.00 is the File specification.  The KINFDS INFORM specifies the INFORM data structure as the File Information Data Structure for this file.  Each time an I/O operations is performed against the file, the database management system populates the INFDS with information regarding the file and the current record.  Every different file type (database, workstation, ICF, printer, etc) has a different INFDS layout.

For a database file (DISK), like this one, positions 397 to 400 contain the database "relative record number".  This number represents the physical row number of the database record in the physical file.  Simply put, if you dumped the contents of the physical file on paper, RRN1 would be the first row in the file, RRN2 would be the second row, and so on.

If these numbers have changed, it is probably not due to your program.  Instead, it is because the data in the physical file has been reordered.  For example, the file may have been reorganized (RGZPGM) or sorted, or reordered in some other way.  

If the physical file is a work file that is created in an earlier step, and changes have been made to the data extract, that might also account for the numbering difference.

The file CDLF looks like it might be a logical file (an index).  Use the WRKF command to see if it is a logical file or a physical.  If it is a logical, you can use the DSPFD command to find the physical file(s) that it is based on.  Most likely, something has changed with the physical file since the documents that you refer to were generated (printed?).

http://publib.boulder.ibm.com/iseries/v5r2/ic2924/books/c092508378.htm
http://faq.midrange.com/data/cache/235.html

You mentioned you "changed the program to the current year".  What, exactly did you change?  If you need more help please post the relevant sections of original and changed code so that we can see what changed.

- Gary R. Patterson
Random Solutions  
 
programming4us programming4us