IBM AS/400 Frozen Dessert Maker User Manual


 
Example of Source Conversion
Converting Source Members with Embedded SQL
When converting code that contains embedded SQL and the SQL code is con-
tinued over multiple lines, the following will occur:
If there are continuation lines but column 74 is blank, the line is simply copied
to the ILE member.
Note: This could be a problem if column 74 happens to be a blank character
inside a character string.
If column 74 is not blank, all of the SQL code from that line to the /END-EXEC
will be concatenated and copied to the ILE member filling up all 80 columns. If
this occurs:
Any comments in column 75 on, will be ignored.
Any embedded comment lines (C*) will be copied to the ILE member before
the concatenated code is copied.
Problems could arise if DBCS literals are split.
If you do not want this concatenation and re-formatting to occur, ensure that
column 74 is blank.
Inserting Specification Templates
Because the source specifications for RPG IV are new, you may want to have
specification templates inserted into the converted source. To have templates
inserted, specify INSRTPL(*YES) on the CVTRPGSRC command. The default is
INSRTPL(*NO).
Converting Source from a Data File
The Conversion Aid will convert source from a data file. Because data files gener-
ally do not have sequence numbers, the minimum record length of the file for
placing the converted output is 80 characters. (See Figure 193 on page 380.) The
recommended record length is 100 characters for a data file.
Note: If your data file has sequence numbers, you should remove them prior to
running the Conversion Aid.
Example of Source Conversion
The example shows a sample RPG III source member which is to be converted to
RPG IV. Figure 194 on page 391 shows the source of the RPG III version.
390 ILE RPG for AS/400 Programmer's Guide