When attempting to use the ALPHA2RUNNR command for a file transfer, such as below:
:SET &ALPHA# = MID("FTADXWZGJ.TXT", 2, 7)
:SET &RET# = ALPHA2RUNNR(&ALPHA#)
:PRINT "RunID: &RET#"
The returned runID is not correct.
Release : 12.3
Component : AUTOMATION ENGINE
Misuse of the ALPHA2RUNNR command.
The ALPHA2RUNNR command requires a seven digit name; for most Automic files this is the full filename in the example. However, file transfers are a longer file name (FT* instead of O*), so there are two methods to have this work as expected.
1.) Remove the F from FT:
:SET &ALPHA# = MID("TADXWZGJ.TXT", 2, 7)
:SET &RET# = ALPHA2RUNNR(&ALPHA#)
:PRINT "RunID: &RET#"
2.) Change the digit the MID command starts at:
:SET &ALPHA# = MID("FTADXWZGJ.TXT", 3, 7)
:SET &RET# = ALPHA2RUNNR(&ALPHA#)
:PRINT "RunID: &RET#"