Automic Workload Automation

 View Only
Expand all | Collapse all

How to increase the MAX characters allowed in script Variable

  • 1.  How to increase the MAX characters allowed in script Variable

    Posted Oct 14, 2016 07:22 AM
    Hi,
    I've written a script that checks the status of my mounts.
    The best way I found to send summary email at the end was to keep adding data to a variable and then use SEND_MAIL with this variable as it's body. (Script below)

    This works fine but I noticed today that I'm getting this error when there appears to be a large amount of data.

    The maximum record length of 1023 characters was exceeded.


    Is there a way of increasing this value or should I maybe look at doing this a different way?

    John.


    :SET &MailText# = "These are the remaining hosts with Mount issue&nl# Please Investiage and resolve&nl#"
    :SET &HND2#=PREP_PROCESS_VAR(DBA.BACKUP_MOUNT_RESULTS, ,"0",4)
    :PROCESS &HND2#
    :   SET &DB_HOST# = GET_PROCESS_LINE(&HND2#,2)
    :   SET &BACKDIR# = GET_PROCESS_LINE(&HND2#,4)
    :   SET &PROD_DB_NAME# = GET_PROCESS_LINE(&HND2#,6)
    :   SET &MailText# = "&MailText#&nl# &DB_HOST# with mount &BACKDIR# on Database &PROD_DB_NAME# &nl# "
    :ENDPROCESS
    SET &OUT# = SEND_MAIL('johnom@xilinx.com',,'Subject",&MailText#)



  • 2.  How to increase the MAX characters allowed in script Variable

    Posted Oct 14, 2016 07:54 AM
    Hi John,

    This is unfortunately a hard-coded limitation that was only removed as of version 11:
    https://docs.automic.com/documentation/WEBHELP/English/AWA/11.2/AE/11.2/All%20Guides/help.htm#uc110a.htm
    Script Variables: Limits have been removed

    The maximum size of script variables (1024 characters) has been removed. There are no limits anymore for the values of script variables.

    JCL lines are no longer limited. Note that the limit for regular script lines (1024) still applies.

    Best regards,

    Antoine



  • 3.  How to increase the MAX characters allowed in script Variable

    Posted Oct 14, 2016 07:56 AM
    Thanks Antoine.
    Could you help with alternative option for me?


  • 4.  How to increase the MAX characters allowed in script Variable
    Best Answer

    Posted Oct 14, 2016 08:09 AM
    Maybe you could:

    - use a notification object rather than SEND_MAIL
    - use :REGISTER_OUTPUTFILE to write the desired information to a file
    - then attach the file to the notification, from its notification tab.

    Or just print the information directly in the job and attach the job report to the notification.


  • 5.  How to increase the MAX characters allowed in script Variable

    Posted Oct 14, 2016 09:05 AM
    Thanks, will try that.


  • 6.  How to increase the MAX characters allowed in script Variable

    Posted Oct 14, 2016 10:52 AM

    I wrote a reuseable action to store the content of a VARA (any kind of) in a CSV file on an agent. You can then attach it with a call operator without writing a single line of code.

    https://marketplace.automic.com/details/vara2csv-csv2vara



  • 7.  How to increase the MAX characters allowed in script Variable

    Posted Oct 14, 2016 10:57 AM
    Hi joel_wiesmann_automic
    I'm trying to access this but when I click on the link, login and try to download, nothing is happening. It says I'm begin redirected but just pops back to initial screen...



  • 8.  How to increase the MAX characters allowed in script Variable

    Posted Oct 14, 2016 11:00 AM
    joel_wiesmann_automic
    it's ok, got it on github


  • 9.  How to increase the MAX characters allowed in script Variable

    Posted Oct 14, 2016 11:05 AM
    Perfect. If you're not familiar with promptset solutions - you can drag the object into a workflow, edit the tasks preferences and in "variables & prompts" you can set the values. That way no promptset will pop up if you start the workflow.


  • 10.  How to increase the MAX characters allowed in script Variable

    Posted Mar 14, 2017 11:43 AM
    Thanks Joel. We're trying this out now, my colleague is looking at ways to export vara's into powershell hash tables and exporting first to a csv seems like a good stepping stone.


  • 11.  How to increase the MAX characters allowed in script Variable

    Posted Mar 14, 2017 01:48 PM
    Hi leon

    You can directly access the AE using Powershell. I wrote various cmdlets for this purpose like get-aeVara

    Regards Joel