Hi All,
I have a quick question about the usage of environment variables and Parameters.
I would build around 35 jobs, performing the same functionality of moving files from one location to other with a minimal of transformation. Now the directories would remain common across all the jobs ( say inbound, outbound, error, archive etc) and the file names will be different. Will it be a good approach to use a single set of environment variables common across all the jobs? Can i call a common environment variables set from all the job sequences?/
Here is my design:
Job sequencer -> Px Jobs
Environment Variables Usage
Moderators: chulett, rschirm, roy
Environment Variables Usage
Avneet
-
- Premium Member
- Posts: 13
- Joined: Mon Oct 24, 2016 7:03 am
Nope - it performs extremely well. I've had thousands of jobs running that were referencing several shared parameter sets with dozens of environment variables.
Be sure and have your Parameter Set structure completely figured out before you start using it in jobs. If you have to add or delete an environment variable later, you'll need to recompile everything that references the parameter set.
Be sure and have your Parameter Set structure completely figured out before you start using it in jobs. If you have to add or delete an environment variable later, you'll need to recompile everything that references the parameter set.
Thanks a lot, I will go ahead with the approach.
Another point I need to ask,
All the incoming files will be in the Inbound folder, I will move them all to Inprocess folder. I plan to use Execute_Command for the same. Can I use a single script for all the jobs sequencers or do I need a separate script per job?
The functionality of the script will be same, as it will be moving from one location to another, will parameterise the file name from job ($1)
Sample Script:
Another point I need to ask,
All the incoming files will be in the Inbound folder, I will move them all to Inprocess folder. I plan to use Execute_Command for the same. Can I use a single script for all the jobs sequencers or do I need a separate script per job?
The functionality of the script will be same, as it will be moving from one location to another, will parameterise the file name from job ($1)
Sample Script:
Code: Select all
#!/bin/bash
var_src_dir="/dev/data/Inbound/"
var_tgt_dir="/dev/data/Inprocess/"
var_file_pattern=$1
var_file_name=`ls -t $var_src_dir$var_file_pattern | head -n 1 | xargs -n1 basename`
mv $var_src_dir$var_file_name $var_tgt_dir$var_file_name
echo $var_file_name
Avneet