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

# GENDETAR.PUB

GENDETAR.PUB is a public program that determines the precise path of an archive folder. This program will convert any run time variables, convert them to actual directory names, and create the directory if needed.

`0060 ENTER OSUS$,RMAR$,ID$,TYPE$,ARCDIR$,ARCDIRS$,ERRMSG$,MENUTYPE$,OVERRIDE$`

Variable | Description
OSUS$ | String template for the OSUS file. If this is blank, then the current user information is retrieved from the OSUS file.
RMAR$ | String template for RMARx file. If this is blank, then the current archive entry for STBL("MPROG") is retrieved.
ID$ | Optionally set to the current master ID needing to archive. This replaces '(ID)' in the archive directory path.
TYPE$ | Optionally set to a form type needing to archive. This replaces '(TYPE)' in the archive directory path.
ARCDIR$ | Returns the final archive path determine by this program.
ARCDIRS$ | Returns the final archive share path determine by this program.
ERRMSG$ | Returns any error message generated by this program.
MENUTYPE$ | Sets the menu type to search for. If blank, GENDETAR.PUB uses STBL("FCTTYPE").
OVERRIDE$ | Overrides the program name and parameter to search for in the archive setup file. Use "~" to separate the program name and parameter.

Exit Points | Explanation
EXIT | GENDETAR.PUB does not return any errors.
EXIT ERR | GENDETAR.PUB returns untrapped errors if one occurs.