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

# GENFILE.PUB

GENFILE.PUB is a public program used to create a single file based on the information stored in xxDATA.yyy. This routine is used to make sure that a file's key definition will be created using the correct key information for a particular application.

`0100 ENTER COMP$,APPLCODE$,DESTDIR$,DATANAME$,ERRCODE,ERRMSG$,OSGUI$`

Variable | Description
COMP$ | Company ID
APPLCODE$ | Application ID
DESTDIR$ | Directory in which to create the file
DATANAME$ | Data record key for the file in xxDATA.yyy
ERRCODE | Error number returned if file create fails
ERRMSG$ | Error message if file create fails
OSGUI$ | GUI template (see GENGURES.PUB on page 3-50 for more detail)

Exit Points | Explanation
EXIT | GENFILE.PUB normally exits with no error. If an error did occur, its value is returned in the variable ERRCODE.