chulett wrote:No. What Tony described is one of the many things Sequence jobs bring to the table - automation of parameter assigned being one such.
What are you using for 'job control'? You'll need to find a methodology that is compatible with that.
If I get what you mean my job control...then I run the jobs using a UNIX script.
Yes, that's what I mean. So, unless you are willing to totally re-engineer your process then $PROJDEF will be a good option for you. Well, except for the fact that every job's associated parameter values default would need to change.
Export, edit, import could handle that.
-craig
"You can never have too many knives" -- Logan Nine Fingers
chulett wrote:No. What Tony described is one of the many things Sequence jobs bring to the table - automation of parameter assigned being one such.
What are you using for 'job control'? You'll need to find a methodology that is compatible with that.
If I get what you mean my job control...then I run the jobs using a UNIX script.
Yes, that's what I mean. So, unless you are willing to totally re-engineer your process then $PROJDEF will be a good option for you. Well, except for the fact that every job's associated parameter values default would need to change.
Export, edit, import could handle that.
Could you please elaborate on "every job's associated parameter values default would need to change"?
If I switch from PROJDEF to Tony's method, why would the default values need to change?
No, I meant that was something you would have to do if you took the $PROJDEF route. For a Sequence job solution, your jobs would be unchanged but your entire job control methodology would need to be rewritten.
-craig
"You can never have too many knives" -- Logan Nine Fingers
chulett wrote:No, I meant that was something you would have to do if you took the $PROJDEF route. For a Sequence job solution, your jobs would be unchanged but your entire job control methodology would need to be rewritten.
********************************************************************************
*
* Name: GetParameterFromFile
*
* Arguments: ConfigFileName - The path and filename of the config file
* ParamName - The parameter within the file to retrieve
*
* Expects file with the contents in the form: ParamName=ParamValue
*
* Open file passed in 'ConfigFileName'. Read until finding the line
* where ParamName equals the 'ParamName' argument value passed in.
* Return the ParamValue found.
*
* If the 'ParamName' value passed in was not found in the file
* return @Null
********************************************************************************
Equate TransformName To "GetParameterFromFile"
* Trim input args and assign to local vars
ConfigFile = Trim(ConfigFileName, ' ', 'B')
ParameterName = Trim(ParamName, ' ', 'B')
ParamFound = @False
* Try to open the file...
OpenSeq ConfigFile To ConfigFileVar
On Error
Msg = 'Error opening parameters file, ' : SQuote(ConfigFile): ', status = ' : Status()
Call DSLogFatal(Msg, TransformName )
Abort
End
Else
Msg = 'Cannot open parameters file, ' : SQuote(ConfigFile): ', status = ' : Status() : ' for Parameter ' : SQuote(ParameterName)
Call DSLogFatal(Msg, TransformName )
Abort
End
* We have successfully opened the file
* Now read the parameter list from the file.
If FileInfo(ConfigFileVar, 0)
Then
Loop
While ReadSeq Line From ConfigFileVar
ParName = Trim(Field(Line,"=",1,1))
ParamValue = Trim(Field(Line,"=",2,1))
If UpCase(ParName) = UpCase(ParameterName) Then
ParamFound = @True
Exit
End
Repeat
CloseSeq ConfigFileVar
End
If ParamFound Then
Ans = ParamValue
End Else
Ans = @Null
Msg = 'Cannot find parameter ' : SQuote(ParamName): ', status = ' : Status()
Call DSLogFatal(Msg, TransformName )
End