I am using the ExtractLogMsgs subroutine to collect the job logs in a text file.
The subroutine works fine for existing files with the JobName.log in the below call.
Call DSLogInfo("Open Output Log Filename ", "ExtractLogMsgs")
OutputLogFname = LogFileDirectory:"\dsEtl_":JobName:".log"
How can I tell the routine to create the JobName.log file if the file does not exist.
I currently do that in a shell script. But wondering if this can be done from DS subroutine (ExtractLogMsgs).
Any help is appreciated!
Extract DS Job Logs
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
ExtractLogMsgs is one of yours, not one of DataStage's. All DataStage routines have names beginning with "DS". You can post the code here (a) if your employer permits and (b) you want us to check it over. Don't forget to enclose it in Code tags so that formatting is preserved.
There is a Create statement in DataStage BASIC, but you don't need it.
Note that OpenSeq will take the ELSE clause if the file does not exist, but the file is nevertheless open for writing.
CloseSeq will create the file if any write operation (WriteSeq, WeofSeq, WriteBlk) has occurred. You don't have to do anything.
There is a Create statement in DataStage BASIC, but you don't need it.
Note that OpenSeq will take the ELSE clause if the file does not exist, but the file is nevertheless open for writing.
CloseSeq will create the file if any write operation (WriteSeq, WeofSeq, WriteBlk) has occurred. You don't have to do anything.
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.
-
- Participant
- Posts: 232
- Joined: Fri Sep 30, 2005 4:52 am
- Contact: