Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
Therefore, if you want to open a DDM file using *LIBL, you must ensure that<br />
there are no local database files with the same name, and that contain the<br />
specified member, anywhere in your library list.<br />
v If the system does not locate a local database file with the specified member, it<br />
searches the library list for the first file that has the specified name. If this file is<br />
not of the proper type, or if it does not contain the specified member, an open<br />
failure occurs.<br />
Therefore, if you want to open a DDM file using *LIBL, you must ensure that<br />
the DDM file you want to open is the first file in your library list with the<br />
specified name.<br />
Detecting file description changes<br />
When a program that uses externally described files is compiled, the high-level<br />
language compiler extracts the record-level and field-level descriptions for the files<br />
referred to in the program and makes those descriptions part of the compiled<br />
program. When you run the program, you can verify that the descriptions with<br />
which the program was compiled are the current descriptions.<br />
The system assigns a unique level identifier for each record format when it creates<br />
the associated file. The system uses the following information to determine the<br />
level identifier:<br />
v Record format name<br />
v Field name<br />
v Total length of the record format<br />
v Number of fields in the record format<br />
v Field attributes (for example, length and decimal positions)<br />
v Order of the field in the record format<br />
Note: It is possible for files with large record formats (many fields) to have the<br />
same format level identifiers even though their formats may be slightly<br />
different. Problems can occur when copying these files if the record format<br />
names of the from-file and the to-file are the same.<br />
Display, printer, and ICF files may also use the number of and order of special<br />
fields called indicators to determine the level identifier.<br />
If you change the DDS for a record format and change any of the items in the<br />
preceding list, the level identifier changes.<br />
To check the record format identifiers when you run the program, specify<br />
LVLCHK(*YES) on the create file or change file commands.<br />
The level identifiers of the file opened and the file description that is part of the<br />
compiled program are compared when the file is opened and LVLCHK(*YES) is<br />
specified. The system does a format-by-format comparison of the level identifiers.<br />
If the identifiers differ or if any of the formats specified in the program do not<br />
exist in the file, a message is sent to the program to identify the condition.<br />
When the identifiers differ, this means that the file format has changed. If the<br />
changes affect a field that your program uses, you must compile the program<br />
again for it to run properly. If the changes do not affect the fields that your<br />
program uses, you can run the program without compiling again by entering an<br />
override command for the file and specifying LVLCHK(*NO). Specifying<br />
Chapter 2. <strong>File</strong> processing 21