Passing Invocation Id
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 51
- Joined: Mon Feb 05, 2007 1:53 pm
Passing Invocation Id
We are attempting to call DS JOBs from Appworx and have a perl script that will directly call a DS job name and kickoff the job. The issue we are having is that for our DSJOBs that require invocation id's we need to establish the invocation id variable in the perl script and I am unsure what stores that information in DS. Where is the generated invocation Id stored while a DSjob is processing? ex $ds_project stores the project name is there a corresponding $ds_invocation...
ds_project seems to be your variable for the script and not a global one or one that holds the project name internally by the DSEngine. When you pass the invocation id via the script, you should store it in a variable and use that variable to retrieve the invocation id.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
-
- Participant
- Posts: 51
- Joined: Mon Feb 05, 2007 1:53 pm
We attempted to assign a variable and pass it back into the DSJOb but the invocation id is not really a parameter in the job properties. We can set a paramater and pass it out but it has to be pointed to somewhere in DS for it to be used. An example of some of the script is below I would think we would need to spell out where the invocation ID should be placed in the DS job run.
error("No par file defined\n") unless $ENV{par};
my $AW_HOME = $ENV{AW_HOME};
my $arg_delimiter = '=';
my $args = get_args($ENV{par}, $arg_delimiter);
my $BASE_DIR = $ENV{BASE_DIR} or error("BASE_DIR is not set.\n");
my $ds_job_prog = "$ENV{DSHOME}/bin/dsjob";
my $ds_job_name = $ENV{command};
my $ds_project = $args->{DSPROJECT} or error("Missing prompt DSPROJECT\n");
my $LOG_DIR = "$BASE_DIR/$args->{DSPROJECT}/logs/jobs";
my $ds_rc_threshold = $args->{DS_RC_THRESHOLD} || 2;
my $ds_logfile = "$LOG_DIR/${ds_job_name}_$ENV{jobid}.log";
my $awprint = "$ENV{AW_HOME}/c/awprint";
my ($script_name) = $0 =~ /([^\/]+$)/; # Pull out the base file name
my $exit_code = 0;
error("No par file defined\n") unless $ENV{par};
my $AW_HOME = $ENV{AW_HOME};
my $arg_delimiter = '=';
my $args = get_args($ENV{par}, $arg_delimiter);
my $BASE_DIR = $ENV{BASE_DIR} or error("BASE_DIR is not set.\n");
my $ds_job_prog = "$ENV{DSHOME}/bin/dsjob";
my $ds_job_name = $ENV{command};
my $ds_project = $args->{DSPROJECT} or error("Missing prompt DSPROJECT\n");
my $LOG_DIR = "$BASE_DIR/$args->{DSPROJECT}/logs/jobs";
my $ds_rc_threshold = $args->{DS_RC_THRESHOLD} || 2;
my $ds_logfile = "$LOG_DIR/${ds_job_name}_$ENV{jobid}.log";
my $awprint = "$ENV{AW_HOME}/c/awprint";
my ($script_name) = $0 =~ /([^\/]+$)/; # Pull out the base file name
my $exit_code = 0;
An invocation id is just a unique number or a character or a string of characters. It could be 1 or a or ALPHA. Before you pass the invocation id like ArndW showed, you could store it. Internally the DSEngine stores this info in the DSInvocationId macro.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
-
- Participant
- Posts: 51
- Joined: Mon Feb 05, 2007 1:53 pm