ALPHA2RUNNR

Use the ALPHA2RUNNR script function to convert the name of a job or a report file to a RunID. When jobs and job reports are stored in the file system, their file names contain the run number (RunID) of the particular job as a 7-digit string (letters). For example, the job report OGMITAEV.TXT in Windows starts with the letter O which indicates that the file is a job report, GMITAEV is the 7-digit string of the converted RunID 2000061045. To process the file name in a script, you can use ALPHA2RUNNR to reconvert the 7-digit string to the 10-digit RunID.

Tip: Use the RUNNR2APLHA script function to convert the 10-digit RunID to a 7-digit string (letters). For more information, see RUNNR2ALPHA.

Syntax

ALPHA2RUNNR (String)

Parameters

  • ALOHA2RUNNR

    Converts the name of a job or report file to a RunID

  • String

    7-digit string (letters)

    Format: script literal or script variable

Return code

The script function returns the run number (RunID).

Example

The following example retrieves the 7-figure string from the file name, and prints the result in the activation report.

:SET &ALPHA# = MID("JAADMXZT.TXT", 2, 7)

:
SET &RET#   = ALPHA2RUNNR(&ALPHA#)

:
PRINT "RunID: &RET#"

See also:

seealso

Script Elements for Editing Strings