Parameters from File
Moderators: chulett, rschirm, roy
Parameters from File
Hi,
I am a text file which has the parameters of a job.
I am writing a jobControl in the job
OPENSEQ 'D:\F2.TXT' TO F5 ELSE ABORT
READSEQ R1 FROM F5 ELSE ABORT
A :=R1
J1=DSAttachJob(Job1, ErrorMode)
Errocode=DSSetParam(J1,"Param1",A).
When I run this job its working fine.The parameter for the job J1 is set.
Now how do I set the parameters for the same job.
I have tried using the jobhandle DSJ.ME but the parameter is not setting the job fails
If the case is I cannot set the parameters for the same job then in sequence job control also this prevails so do i need to hand code the parameters for my first job in the sequence.Correct me if am wrong somewhere.
Regards,
Bala
I am a text file which has the parameters of a job.
I am writing a jobControl in the job
OPENSEQ 'D:\F2.TXT' TO F5 ELSE ABORT
READSEQ R1 FROM F5 ELSE ABORT
A :=R1
J1=DSAttachJob(Job1, ErrorMode)
Errocode=DSSetParam(J1,"Param1",A).
When I run this job its working fine.The parameter for the job J1 is set.
Now how do I set the parameters for the same job.
I have tried using the jobhandle DSJ.ME but the parameter is not setting the job fails
If the case is I cannot set the parameters for the same job then in sequence job control also this prevails so do i need to hand code the parameters for my first job in the sequence.Correct me if am wrong somewhere.
Regards,
Bala
You have to open the file in something else, we use a control batch job and the code looks like :
OpenSeq "G:\DataStage\DStage_Data\ACSPROD1_Control.txt" To INLINE Then
ReadSeq DataLine from INLINE Then
Server = Trim(DataLine)
End
CloseSeq INLINE
End
Call DSLogInfo("AS400 Control: ":Server,"Job Control")
OpenSeq "G:\DataStage\DStage_Data\ACSPROD1_Control.txt" To INLINE Then
ReadSeq DataLine from INLINE Then
Server = Trim(DataLine)
End
CloseSeq INLINE
End
Call DSLogInfo("AS400 Control: ":Server,"Job Control")
Hi Bala,
You can hard code the constant values in sequence and pass it to the underlying called jobs. Steadily changing values can be fed to the main sequnce by any batch program or an .bat which reads the parameter file and pass it.
Else use the batch code itself to call the jobs and so passing the value of the parameters to it.
If necessary the bunch of jobs can be called by a batch and the sequnce of the batch can be configured in a sequence.
-Kumar
You can hard code the constant values in sequence and pass it to the underlying called jobs. Steadily changing values can be fed to the main sequnce by any batch program or an .bat which reads the parameter file and pass it.
Else use the batch code itself to call the jobs and so passing the value of the parameters to it.
If necessary the bunch of jobs can be called by a batch and the sequnce of the batch can be configured in a sequence.
-Kumar
-
- Participant
- Posts: 23
- Joined: Mon Jul 04, 2005 6:25 am