I have a number of Server Jobs that are controlled through one other Server Job via JCL.
The part that I am struggling with is described as follows:
I have a table on a MSSQL Server that contains basic Fund information and the location of which SYBASE server the Fund data is resident on.
e.g.
SYBASE
Fund Name ServerName
FUND1 ST_PPSA
FUND2 ST_PPSA
FUND3 BKP_ANY2
FUND4 WM_INT1
and so on for 5000 records.
When I run the controlling server job the first thing it does is call the Server Job that connects to the SQL Server. For that Server Job I pass the SQL Servers server name via a parameter along with connection information and a SYBASE server to target. In this example I will use ST_PPSA.
The output of this server job would be to produce a file called ST_PPSA_extract_data.dat which would contain FUND1 and FUND2. The file name is generated by the use of a parameter in the server job that attaches to the SQL Server #SERVERNAME#_extract_data.dat.
This all works fine.
The Server Job with the JCL has parameter #SERVERNAME# that I want to reference in the JCL.
For each entry in the file produced above I want to attach to the relevant Sybase server and retrieve further information.
Each entry is read to a variable which is passed to the Server job that connects to the Sybase servers.
In the JCL I have tried to use the OPENSEQ command with #SERVERNAME#_extract_data.dat but for some reason the #SERVERNAME# does not get replaced with the parameter value specified at run time.
If I look at Director a message appears stating that #SERVERNAME#_extract_data.dat doesn't exist.
The #SERVERNAME# is prompted for and I have also tried a default value but to no avail.
Hard-coding the file name does of course work.
I have had no problems using parameters in JCL to pass values to server jobs under its control. They just seem to be ignored if the parameter is specified on the same server job that the JCL is on.
Is there anyway around this ? - I hope that this is clear enough to understand.
JCL and Parameter Issue
Moderators: chulett, rschirm, roy
Hi,
Job Controll meaning Basic?!
in basic a parameter named SERVERNAME would be refered to as that exact name with no # signs around it, just as you'll notice it apears when you set a parameter value of a job activity in a sequence job that is derived from a parameter of the sequence job.
so in GUI design such as a file name for sequential file stage you wrap the parameter name with # (In your case).
in Basic Expression you don't use # (in your case).
IHTH,
Job Controll meaning Basic?!
in basic a parameter named SERVERNAME would be refered to as that exact name with no # signs around it, just as you'll notice it apears when you set a parameter value of a job activity in a sequence job that is derived from a parameter of the sequence job.
so in GUI design such as a file name for sequential file stage you wrap the parameter name with # (In your case
Code: Select all
#SERVERNAME#_extract_data.dat
in Basic Expression you don't use # (in your case
Code: Select all
SERVERNAME : "_extract_data.dat"
IHTH,
Roy R.
Time is money but when you don't have money time is all you can afford.
Search before posting:)
Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
![Image](http://www.worldcommunitygrid.org/images/logo.gif)
Time is money but when you don't have money time is all you can afford.
Search before posting:)
Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
![Image](http://www.worldcommunitygrid.org/images/logo.gif)