I am having a hard time to figure out several things in my first routine. Basically I have to write a routine that runs after a job completes and I have the following issues:
1. Routine should start right AFTER job completes but DSJ.JOBSTATUS returns 0 which means the job is still running. How could I call this routine to indicate a status that indicates the job is finished ? RUNOK, RUNWARN etc don't matter too much, it is important not to be running.
2. I want to append a file but I can't figure it out why the code bellow is just overwriting the file and is not appending it.
Code: Select all
DirName = InputArg
FileName = "MyFile.csv"
FilePath = DirName:"/":FileName
FileLine = "some text"
OpenSeq FilePath to Temp.FVar
Else Create Temp.FVar Else Abort
WeofSeq Temp.FVar
WriteSeq FileLine to Temp.FVar else Stop
CloseSeq Temp.FVar
I am new to DataStage and I have just discovered Universe Basic language. Any help will be appreciated. Thanks in advance.