6.3 Porting Examples



Examples of the commands used for transferring applications are shown below. All files not in text format must be converted to their corresponding text versions before they can be moved to another machine. As was described in the previous section, the text version of each file is named by adding a .a extension to the original file name. In the examples below, the \ must be used as a separator in a filename when the filename is an argument to a MS-DOS command (i.e. >, <, type).

Use the pdef -d command to convert each definition file to its text format.

pdef -d ar\def\customer ar\def\customer.a

Screen files are converted to text format by using the pform -d command.

pform -d ar\scr\customer ar\scr\customer.a

Use the pull -fa command to save the data from a data file in a text file. The pdict -n command saves the number of records in the data file. You need this number to remake the data file on the destination machine.

pull -fa ar\data\customer > ar\data\customer.a

pdict -n ar\data\customer > ar\data\customer.n

Reports that have been created using wtrdef must be converted to text format using the preport -d command. Reports that have been created using a text editor are already in text format and do not need to be converted.

preport -d ar\rptdef\customer > ar\rptdef\customer.a

The next step is to send all the text files to the destination machine. Once the files have been transferred, they must be converted back to their original formats. The cdef command converts the text version of a definition file to its normal form.

cdef ar\def\customer.a ar\def\customer

The makelf command is used to create a data file from its definition file. Makelf requires as a parameter the number records in the data file. This number was saved in the file with the .n extension. You can use the MS-DOS command type to examine this file.

type ar\data\customer.n

makelf ar\data\customer [# records] ar\def\customer

Once the data file has been created, the actual data is put back into the file with the put -f command.

put -f ar\data\customer < ar\data\customer.a

The cform command converts screen text files back to the screen file format.

cform ar\scr\customer.a ar\scr\customer

Use the command creport to convert the wtrdef text files.

creport ar\rptdef\customer.a ar\rptdef\customer