Automation Engine Script Guide > Ordered by Function > Strings > ALPHA2RUNNR

ALPHA2RUNNR

Script Function: Converts the name of a job or report file to a RunID

Syntax

ALPHA2RUNNR(String)

Syntax

Description/Format

String

7-figure string (letters)
Format: script literal or script variable


Return code

Run number (RunID)

Comments

The script function converts a string consisting of 7 letters 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 in form of a 7-figure string (letters). Example for a job report in Windows: OGMITAEV.TXT. "O" indicates the job report, "GMITAEV" is the string of the converted RunID 2000061045. In order to process the file names in a script, the string can again be converted to the 10-figure RunID with ALPHA2RUNNR.

With the script function RUNNR2ALPHA, the 10-figure RunID is converted to a 7-figure string (letters).

Example

In this example, the 7-figure string is determined from the file name and output in the activation log.

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

 

See also:

Script element Description

RUNNR2ALPHA

Converts the RunID to the corresponding file name

Script Elements - Strings

About Scripts
Script Elements - Alphabetical Listing

Script Elements - Ordered by Function