i want to write some log message using the following routine.but it is not creating any file "I:\TELSTRA_DATASOURCE_ETL\FLEXCAB\TMP\LogFile.txt"
Can any one help me to finding the problem:
ErrorCode = 0 ;* set this to non-zero to stop the stage/job
$INCLUDE DSINCLUDE JOBCONTROL.H
cmd1="move /Y I:\TELSTRA_DATASOURCE_ETL\FLEXCAB\SRC\*.csv I:\TELSTRA_DATASOURCE_ETL\FLEXCAB\PRCSD"
Call DSExecute("NT", cmd1, op, SystemReturnCode)
* FILEPATH=I:\TELSTRA_DATASOURCE_ETL\FLEXCAB\TMP\LogFile.txt
path=DSGetParamInfo(DSJ.ME, "FILEPATH", DSJ.PARAMDEFAULT)
if SystemReturnCode<>0 then
OpenSeq path to objVar then
WeofSeq objVar
end
message1="Before-Job Routine Aborted":" ":"Error-Code1=":SystemReturnCode
WriteSeqF message1 to objVar then
end
CloseSeq objVar
end
Problem to write a file
Moderators: chulett, rschirm, roy
1.Put in a to see what value you are getting for the path.
2. Add an error and else code branch to your OPENSEQ command.
Code: Select all
CALL DSLogInfo('Path is "':path:'".','')
2. Add an error and else code branch to your OPENSEQ command.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Why, from that, would you expect any file called Logfile.txt to be created, there or anywhere? I can not see anywhere, in your code, that a file of this name is opened/created and/or written to. You've commented out the statement that assigns the file path. You do not verify that the call to DSGetParamInfo() was successful.
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.