More Related Content
Similar to Pre-Con Ed: Understanding when and how to use JavaScript at the Event, Application and Job Level (20)
More from CA Technologies (20)
Pre-Con Ed: Understanding when and how to use JavaScript at the Event, Application and Job Level
- 22. 22 © 2016 CA. ALL RIGHTS RESERVED.@CAWORLD #CAWORLD
The following fields must be resolved at run time
PROPERTIES CA WA DESKTOP CLIENT DIALOG CA WA DESKTOP CLIENT FIELDS
Email addresses New Email Notification dialog To field
Agent specifications Job definition Basic dialog
Agent name, Command to run,
Script/command name, Arguments
to pass, and User ID fields
Environment variables Job definition Environment Variables dialog Name and Value fields
OS/400 environment
specifications
Environment dialog
Library specifications, Job
specifications, and OS/400 exit
program fields
Exit codes Job definition Exit Codes tab Code and Interpretation fields
Trigger conditions for File
trigger jobs
Job definition Basic dialog
Job definition User/Group specifications dialog
File name field
Owner user ID, group, and Monitor
as user fields
Step specifications for SAP
R/3 jobs
Job definition Step Specifications dialog All fields
Agent specifications for
PeopleSoft jobs
Job definition Basic dialog Process name and Process type fields
- 32. 32 © 2016 CA. ALL RIGHTS RESERVED.@CAWORLD #CAWORLD
JavaScript defined in the Job Scenarios
§ The script sets values for variables used by a single job.
§ The script sets a variable whose value must be confined to a single job (the
symbolic variable is used in multiple jobs but must have a unique value for each
job).
§ The script specifies run criteria for a single job.
§ The script defines or sets values for symbolic variables that begin with the prefix
WOB.
§ The script defines or sets values for system-level symbolic variables. The names of
these variables begin with the prefix ESP.
§ The script defines or sets values for Application-level symbolic variables. The
names of these variables begin with the prefix APPL.
- 40. 40 © 2016 CA. ALL RIGHTS RESERVED.@CAWORLD #CAWORLD
Some commonly used built-in functions to automate
command execution
§ execCommand(jobname|ALL|SUBAPPL(subApplname),
applnameAndGeneration,action)
§ execTrigger(eventname,ADD|REPLACE,time,NOHOLD|HOLD,
userparameter1,userparameter4,userparameter3,
userparameter2,rootjobs)
§ resetResourceProperty(resourceName,property,count)
- 48. 48 © 2016 CA. ALL RIGHTS RESERVED.@CAWORLD #CAWORLD
Example JavaScripts that you should have in your
repository
§ Set times based on day of the week using Switch
case '5':
APPL.Start_batch="5PM";
APPL.Late_end = "5AM tomorrow";
break;
case '6':
APPL.Start_batch="6PM";
APPL.Late_end = "6AM tomorrow";
break;
case '7':
APPL.Start_batch="7PM";
APPL.Late_end = "7AM tomorrow";
break;
default:
Start_batch="8PM";
Late_end = "8AM tomorrow";
}
genTime('TD','today');
switch (TDDOWNUM)
{
case '1':
APPL.Start_batch="1PM";
APPL.Late_end = "1AM tomorrow";
break;
case '2':
APPL.Start_batch="2PM";
APPL.Late_end = "2AM tomorrow";
break;
case '3':
APPL.Start_batch="3PM";
APPL.Late_end = "3AM tomorrow";
break;
case '4':
APPL.Start_batch="4PM";
APPL.Late_end = "4AM tomorrow";
break;
- 51. 51 © 2016 CA. ALL RIGHTS RESERVED.@CAWORLD #CAWORLD
Recommended Sessions
SESSION # TITLE DATE/TIME
MFX23E
Best Practices: CA WLA DE Artifacts to Move Apps
through the Development Lifecycle
11/14/2016 at 4:00pm
Jasmine B
MFX141EL
Lab: Increased Agility and Flexibility with Web Services
for CA WLA DE and ESP
11/15/2016 at 9:30 am
South Seas D
MFX30S Customer Use Case: Real World Automation in Retail
11/16/2016 at 3:45pm
Banyan A/B
MFX136S
Delivering CA Workload Automation from a SaaS
platform
11/17/2016 at 4:30 pm
Jasmine B