UOA:OMQCHGCN
Conversion Definition API (OMQCHGCN) - Help
Conversion Definition API (OMQCHGCN)
This Application Program Interface command allows you to manipulate the TD/OMS database. This can be done from a command line or from within your programs.
The Conversion Definition API can add, change, and delete the conversion definitions. The Conversion Definition command allows you to define the non-default conversions to be done for a specific physical file. By default, a conversion is executed using the copy parameters *MAP and *DROP, so new fields are initialized and removed fields are skipped.
You can define a user program that is called during Object Transfer, if another type of conversion must be executed for a specific application this user program will be called with a predefined parameter list when the conversion must be performed.
If a new physical file must be initially filled with data from another existing file for some. You can declare the Related Object Code. OMS will then convert the data from this file into the newly created physical.
Users with authorization code 3 are allowed to start this command.
Application code
Specify the application code. See the description of the application code for more information.
File
Use this prompt to enter the object code of the physical file you are defining the conversion for. A blank value is not allowed.
Member
Use this prompt to enter a specific member name if a single member is connected to a fix, not the physical file itself. The value *ALL must be used if a physical file is connected to a fix.
Conversion type
The data conversion type instructs OMS what action must be taken on the data in a physical file. Default conversion will be performed by OMS if no conversion type is defined for a specific physical file: The contents of the replaced physical file will be copied to the newly created physical using the *MAP and *DROP parameters.
The possible values are:
- 1=Including data (*DATA)
- The object will be copied as will the data it contains, thus replacing existing data members. Use this value for physical files containing changed parameter values.
- 2=Without data (*NODATA)
- The object will be copied without the data it contains, thus creating an empty file.
- 8=Call user program (*USRPGM)
- A user conversion program which can be defined in the OMS conversion file (See technical description below) will be called after the physical file has been created.
- 9=Convert from other file (*OTHOBJ)
- Standard conversion will be executed, though not from an equally named physical file but from a physical file with a different name.
- Technical description
A user program is called using the following parameters for type *USRPGM. All parameters are character fields:
Parameter Description (length) FENV The From-environment code (C5) FOBC The From-object code; the physical file with data (C10) FOBL The library of the physical file to be copied (C10) TENV The To-environment code (C5) TOBJ The To-object code; the newly created physical file (C10) TOBL To library of the newly created physical file (C10) STAT The status after converting the data (C5). Use the value *NORM' for normal ending of program and '*TERM' for abnormal ending.
Conversion program
Use this value in combination with conversion type *USRPGM to enter the object code of the conversion program to be called.
- *SAME
- Use this value to indicate that the conversion program name does not change. In *ADD mode, this value is not allowed. In *change this value is allowed only if the database does not have a blank value.
Conversion library
Use this value in combination with conversion type *USRPGM to enter the object code library of the conversion program to be called.
- *SAME
- Use this value to indicate that the conversion library name does not change. In *ADD mode, this value is not allowed. In *change this value is allowed only if database does not have a blank value.
- *LIBL
- Use this value to indicate that the conversion program will be referred from the library list.
Related object
Use this prompt in combination with conversion type *OTHOBJ to enter the related object code. This must be a physical file that will be used to copy the data from.
- *SAME
- Use this value to indicate that related object code does not change. In *ADD mode, this value is not allowed. In *change this value is allowed only if database does not have a blank value.
Ignore warning
Specify the ignore warnings indicator. The possible values are:
- *NO
- Use this value if you want to show warning messages.
- *YES
- Use this value if you do not want to show warning messages.