In RPG III, there are occasions when it is impossible to determine the type of specifications in a /COPY member without the context of the surrounding specifications of the primary source member. There are two instances of this problem:
I* If the RPG III source member contains only the source
I* statements describing fields FIELD1 and FIELD2 below, the
I* Conversion Aid is unsure how to convert them. These
I* statements may be data structure fields (which are converted
I* to definition specifications) or program-described file
I* fields (which are converted to input specifications).
I 1 3 FIELD1
I 4 6 FIELD2 I* If the RPG III source member contains only the source
I* statement describing field CHAR below, the Conversion
I* Aid is unsure how to convert it. This statement may be
I* a rename of an externally described data structure field
I* which is converted to a definition specification) or
I* a rename of an externally described file field)
I* (which is converted to an input specification).
I CHARACTER CHARIn the above two instances, a data structure is assumed and definition specifications are produced. A block of comments containing the input specification code is also produced. For example, the Conversion Aid will convert the source in Figure 230 to the code shown in Figure 232. If Input specification code is required, delete the definition specifications and blank out the asterisks from the corresponding Input specifications.
D* If the RPG III source member contains only the source
D* statements describing fields FIELD1 and FIELD2 below, the
D* Conversion Aid is unsure how to convert them. These
D* statements may be data structure fields (which are converted
D* to definition specifications) or program-described file
D* fields (which are converted to input specifications).
D FIELD1 1 3
D FIELD2 4 6
I* 1 3 FIELD1
I* 4 6 FIELD2Remember that you have two ways of correcting these types of problems. Either use the EXPCPY(*YES) option of the CVTRPGSRC command, or manually correct the code after conversion.