You are here: Development Standards > Routines > General Routines > GENCOPY2.PUB

# GENCOPY2.PUB

GENCOPY.PUB is a public program for copying a source file to a destination file. The file is copied reading and writing one record at a time, so that an existing Mkeyed file can be converted to a highly-recoverable Mkeyed file. Each parameter must include the path location and name of the file.

`0100 ENTER SOURCE$,TMPDEST$,CID$,APPL$,XXFILE$,OSGUI$`

Variable | Description
SOURCE$ | Location and name of source file(s)
TMPDEST$ | Location and name of destination file(s)
CID$ | Company ID of current company
APPL$ | Current application ID
XXFILE$ | Name of xxDATA.610 file to use to create the new file(s)
OSGUI$ | GUI template (see GENGURES.PUB on page 3-50 for more detail)

Exit Points | Explanation
EXIT | GENCOPY.PUB does not return any errors.

If SOURCE$ starts with the word LIST, then a list of files may be included within SOURCE$, each separated by a comma. The destination path is then set in DEST$.