Changing params at runtime
Moderators: chulett, rschirm, roy
Changing params at runtime
is there anyway to set/change a param at runtime?
I am creating a dynamic FTP stage and want to change the Remote File Name while running the job. I know i can create a job control get the filename and then pass it into my FTP stage as a param. but i am tring to eliminate a job.
I am creating a dynamic FTP stage and want to change the Remote File Name while running the job. I know i can create a job control get the filename and then pass it into my FTP stage as a param. but i am tring to eliminate a job.
Short answer is 'no', you can't change the value of a parameter from inside the job. As you said, this is typically the job of a job control batch.
Just a thought, but you might want to look into writing a script to do the ftp instead of using the FTP stage, this can be launched as an after-job routine and passed a generated filename as a parameter.
What platform does your server run on?
-craig
Just a thought, but you might want to look into writing a script to do the ftp instead of using the FTP stage, this can be launched as an after-job routine and passed a generated filename as a parameter.
What platform does your server run on?
-craig
we are on a unix machine. i am not too familiar with shell scripting and wanted to keep as much as posible inside of DS for trouble shooting purposes.
i can accomplish what i need to by running a job to update a universe table, run a transform to pull data out of UV table and then run the FTP job and pass the UV data in as a param.
i can accomplish what i need to by running a job to update a universe table, run a transform to pull data out of UV table and then run the FTP job and pass the UV data in as a param.
Yes, that would be a pretty 'standard' way of doing what you need to do. Sorry if this is all old news to you, but if you needed to do this with multiple files you could have the first job write multiple records to a hash file, then have job control read the hash in a loop, executing the ftp job for each record it finds in the hash.
If you are only passing a single item from one job to another, instead of writing it to a hash file you might want to take a look at DSSetUserStatus and DSGetUserStatus.
-craig
If you are only passing a single item from one job to another, instead of writing it to a hash file you might want to take a look at DSSetUserStatus and DSGetUserStatus.
-craig
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
The point I was trying to make by pointing out the location where the user status information is stored is that it is not accessible to other jobs, unless those other jobs have attached the job whose user status area has had a value placed in it. That is, control jobs.
There's no reason not to use a hashed file or an operating system file to communicate information between jobs, however; access is just as fast (recall that RT_CONFIGxxx is a hashed file). If a lot of information must be passed between jobs in real time, consider the use of named pipes via Sequential File stages.
There's no reason not to use a hashed file or an operating system file to communicate information between jobs, however; access is just as fast (recall that RT_CONFIGxxx is a hashed file). If a lot of information must be passed between jobs in real time, consider the use of named pipes via Sequential File stages.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
A job parameter is exactly that; a starting value for a job.
If you want something you can change at run time, use a Routine and place one or more of its variables in a COMMON area of memory.
If you want to communicate between jobs, use a controlling job and the user status area, or named pipes, or simply an operating system file or hashed file.
The tools are all there - it's just a matter of using the right tool.
Ray Wurlod
Education and Consulting Services
ABN 57 092 448 518
If you want something you can change at run time, use a Routine and place one or more of its variables in a COMMON area of memory.
If you want to communicate between jobs, use a controlling job and the user status area, or named pipes, or simply an operating system file or hashed file.
The tools are all there - it's just a matter of using the right tool.
Ray Wurlod
Education and Consulting Services
ABN 57 092 448 518