ALPHA2RUNNR: File Transfers do not return the correct runID
search cancel

ALPHA2RUNNR: File Transfers do not return the correct runID

book

Article ID: 205059

calendar_today

Updated On:

Products

CA Automic Workload Automation - Automation Engine

Issue/Introduction

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.

Environment

Release : 12.3

Component : AUTOMATION ENGINE

Cause

Misuse of the ALPHA2RUNNR command.

Resolution

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#"