This is my first post - so go easy with me.
I have a server job where I need part of the output file name to be dynamic. That is, the first part of the target file name will always be the same, but the second part of the target file name would be determined by a particular character value found in my source file.
To be more specific, does anyone know of a way that I would be able to attach a value from within the source file to the output target file name?
Thanks for any help.
Thomas Smith
dynamic file name
Moderators: chulett, rschirm, roy
dynamic file name
Last edited by hobocamp on Wed Jan 03, 2007 3:33 pm, edited 1 time in total.
-
- Premium Member
- Posts: 1255
- Joined: Wed Feb 02, 2005 11:54 am
- Location: United States of America
Can be done in two jobs. Find and store that special character, in a file or UerSatus. In your second job, define a parameter, while defining the parameter, the default value will be a routine which will make a call to the user status or read it from whereever you stored it. Tie the jobs together via job sequence.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
-
- Premium Member
- Posts: 1255
- Joined: Wed Feb 02, 2005 11:54 am
- Location: United States of America
How about defining a job parameter "File_Name_Append" and then set the value of this parameter to your character by using 'DSSetParam' function in a stage variable.
Use the 'DSGetParamInfo' in the after-job subroutine(ExecSH) to retrieve your character from the parameter and rename your created file.
This is just coming of the top of my head. It is not tested. So, I'm not sure whether it will work.
Whale.
Use the 'DSGetParamInfo' in the after-job subroutine(ExecSH) to retrieve your character from the parameter and rename your created file.
This is just coming of the top of my head. It is not tested. So, I'm not sure whether it will work.
Whale.
Anything that won't sell, I don't want to invent. Its sale is proof of utility, and utility is success.
Author: Thomas A. Edison 1847-1931, American Inventor, Entrepreneur, Founder of GE
Author: Thomas A. Edison 1847-1931, American Inventor, Entrepreneur, Founder of GE
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Can also be done in an after-job subroutine, provided you've stored the special character somewhere. But this would be a custom subroutine, not one of the out-of-the-box ones.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
It wont work Whale. A job parameter cannot be set within the job. It needs to be set before the job is fired. It can definately be done before starting the job. The OP is sitting on unix, so the special character can be read and stored in a file, the contents of that file can be passed as a parameter to the job with -param option.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Safer to assert that a job parameter can not legally be changed in a running job. Some folks out there are doing it illegally, and will need to re-think their strategy before upgrading to version 8.0, when their "hack" may cease to work.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.