Automic Workload Automation

  • 1.  READING VARA CONTENTS TO A TEXT FILE

    Posted May 10, 2018 03:21 AM

    Hi Experts,

     

    I want to read the contents in my vara to a text file, please can any one help me how can we do it?

    EX: 

    i want to read this contents in vara to a TEXT FILE.

    Regards,

    Vikram.G



  • 2.  Re: READING VARA CONTENTS TO A TEXT FILE

    Posted May 10, 2018 07:57 PM

    Use the script function PREP_PROCESS_VAR() to access the list of data in the variable.  Then use the WRITE_PROCESS() function to write the txt file.

     

    I have not played around with the PREP_PROCESS_VAR() function so I'm not sure of its exact syntax.  You will have to look it up and test it yourself.  But here is a small script I ran the other day to test the WRITE_PROCESS() function.

     

     

    ! Writes a report out to a custom flat file
    :SET &HND# = PREP_PROCESS_REPORT(,&$RUNID#,'REP')
    :SET &RET# = WRITE_PROCESS(&HND#,'\\t11946\Public\TestFile.txt',&$AGENT# ,'LOGIN.UC4',OVERWRITE)
    :print "Results of write operation: &RET#"
    :CLOSE_PROCESS &HND#