Automic Workload Automation

Expand all | Collapse all

Script Not Working in RAFTP Post Processing

Jump to Best Answer
  • 1.  Script Not Working in RAFTP Post Processing

    Posted 10-31-2019 05:52 PM
    Using v12.3, I need to find a file on a non agented server and then assign it to a variable.

    Using RAFTP free form command:

    Get these results in Report
    2019-10-31 14:41:34 Executing command: ls -lt | tail -1 on CONN.FTPAGENT.CDHS.DYS.EHR
    2019-10-31 14:41:34 CODYS_20190828124535.xml
    2019-10-31 14:41:34 CODYS_20190820090019.xml

    Oddly, ls -lt | tail -1 and ls -ltr | tail -1 return the same result. 2 files instead of a single newest/oldest file name.

    I copied some post processing code that works in my production environment and did an edit to substr the processing line to test I return the correct portion.#

    :SET &CNT# = 0

    : PRINT &RET#
    : SET &FILE# = SUBSTR(&RET#,64,24)
    : PRINT &FILE#
    !: PRINT &CNT#
    !: SET &CNT# = &CNT#+1
    !: PRINT &CNT#
    !: IF &CNT# > 0
    !: ENDIF

    I run the job and it completes normally.  However, there is no Post Processing report, only Report and Directory.

    So I did step by step

    :SET &CNT# = 0
    :PRINT &HND#

    This returns $Process1 in the Post Processing report

    Then when I add the PROCESS lines back in and run, again only Report and Directory.

    I loaded the latest RAFTP jar 4.07 for another issue so I know I am current.

    Any ideas why it is giving me heartburn.


    State of Colorado

  • 2.  RE: Script Not Working in RAFTP Post Processing
    Best Answer

    Posted 11-01-2019 02:40 AM
    Hi Tim

    PREP_PROCESS_REPORT will return a handle (like a pointer in C) to the report data. To access data:

    :SET &CNT# = 0


    Swisscom Automation Engineer & PE Membership Creator

    Entfessle mehr Automic Wissen mehr Automic Tools