Error: Invalid AFM - Autosys job fails due to hidden characters in Global Variables
search cancel

Error: Invalid AFM - Autosys job fails due to hidden characters in Global Variables

book

Article ID: 449066

calendar_today

Updated On:

Products

Autosys Workload Automation Workload Automation Agent

Issue/Introduction

An Autosys job fails immediately upon submission with a status of FAILURE and a sub-status/status of Invalid AFM.

The defaultlog_agent.log on the Workload Automation Agent contains the following stack trace:

RunnerPlugin.runner Internal Thread.CybWOBRunDotHandler.processWob[:580] - cybermation.library.afm.CybInvalidAFMException: Unprintable character
                                                                               at cybermation.library.afm.CybAFMTokenizer.d(CybAFMTokenizer.java:748)
                                                                               at cybermation.library.afm.CybAFMTokenizer.parseOld(CybAFMTokenizer.java:1174)
                                                                               at cybermation.library.afm.CybAFMTokenizer.<init>(CybAFMTokenizer.java:168)
                                                                               at cybermation.library.afm.CybAFMParser.getTokenizer(CybAFMParser.java:589)
                                                                               at cybermation.library.afm.CybAFMParser.lookupIgnoreCase(CybAFMParser.java:426)
                                                                               at cybermation.plugins.runner.wobhandler.CybWOBRunDotHandler.processWob(CybWOBRunDotHandler.java:460)
                                                                               at cybermation.plugins.library.base.CybRMIExternalPluginBaseManager.processWob(CybRMIExternalPluginBaseManager.java:627)
                                                                               at cybermation.plugins.library.base.CybRMIExternalPluginBaseManager.run(CybRMIExternalPluginBaseManager.java:460)
                                                                               at java.lang.Thread.run(Thread.java:750)

Environment

Workload Automation AE (Autosys)
Workload Automation Agent

Cause

A Global Variable used in the job definition (e.g., in the command or args fields) contains hidden, unprintable characters or trailing non-breaking spaces (such as U+A0). When the Scheduler resolves the variable to construct the Automated Framework Message (AFM), these characters malform the AFM syntax. The Agent rejects the message as an Invalid AFM because it cannot parse the unprintable characters.

Resolution

Follow these steps to identify and clean the affected Global Variable:

  1. Determine which Global Variables are used in the failing job's definition.

  2. Check the current value of the variable using the following command:
    autorep -G ALL -v VARIABLE_NAME

  3. Re-set the variable to remove trailing whitespace or hidden characters:
    sendevent -E SET_GLOBAL -G "VARIABLE_NAME=VALUE"
    Ensure no space exists between the end of the value and the closing quotation mark.

  4. Re-run the job.

If the Global Variable is set by an automated process, verify the source data to prevent future recurrence.

Additional Information

To speak with a customer representative or a Support Engineer see Contact Support. Scroll to the bottom of the page and click on the respective region.