Automic Community

Write content of variable on a file

  • 1.  Write content of variable on a file

    Posted 03-22-2019 07:10 PM

    HI! Can I put the content of a variable on a file?

     

    I did it before using 

     

    :SET &HND# = PREP_PROCESS_REPORT(,"&RUNIDSCRIPT", "REP",,,)
    !:SET &FILE# = "E:\logs\logs.txt"
    :SET &RETN# = WRITE_PROCESS(&HND#,"&TEXTFILENAME#",&AGENT#, &LOGIN#)

    but &HND# is a Data sequence reference.

     

    How can I do the same but using a variable? Example:

     

    :  set &result# = PREP_PROCESS_REPORT(,"&RUNIDSCRIPT", "REP", "*java.sql.SQLSyntaxErrorException:*",,)
    :  PROCESS &result#
    :    set &ismatch# = GET_PROCESS_LINE(&result#)
    :    SET &ismatchn# = PRE?????("&ismatch#")
    :    SET &RETN# = WRITE_PROCESS(&ismatchn#,"&TEXTFILENAME#",&AGENT#, &LOGIN#)????? These code does not working
    !:    pset &msgi# = STR_CAT("INSERT.MATCH:", &ismatch#)
    :    pset &msgi# = STR_CAT(&msgi#, &ismatch#)
    :  ENDPROCESS
    :  CLOSE_PROCESS &result#

     

    Thanks