Hi all,
I have to write to an xml file about the job in to a directory.
what does the t.fvar mean . what does it do?
does
write ReportText to t.fvar, v_JobreportFileName else
sufficient to write the full information
please help me on this
Openpath v_logFolder to t.fvar then
write ReportText to t.fvar, v_JobreportFileName else
call DSLogWarn("Failed to write file ":v_JobreportFileName)
end
end
else
call DSLogWarn("Failed to open directory ")
end
close t.fvar
info onthe piece of code
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Not really, unless you can show us how the v_... variables and the ReportText variable get their values. DSLogWarn requires two arguments. There's no value trying to close a file if you failed to open it.
The variable "t.fvar" is what's called a "file variable" or "file handle" - effectively a pointer to a structure that all other I/O statements must use.
Please enclose your code in Code tags as follows to preserve indenting.
The variable "t.fvar" is what's called a "file variable" or "file handle" - effectively a pointer to a structure that all other I/O statements must use.
Please enclose your code in Code tags as follows to preserve indenting.
Code: Select all
Openpath v_logFolder to t.fvar Then
Write ReportText to t.fvar, v_JobreportFileName Else
Call DSLogWarn("Failed to write file ":v_JobreportFileName, "MyRoutine")
End
Close t.fvar
End
Else
Call DSLogWarn("Failed to open directory ", "MyRoutine")
End
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.