I need to write on a XML file Output the number of the total record that i will insert on the file, Do U know ohw to do it, and if it's possible??
Thanks
Total Record on a XML File
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
I doubt that it's possible with the XML Writer, but you can do it with a before-stage (or after-stage) subroutine, depending on where you want the extra information.
The easiest way is to invoke the subroutine that executes an operating system command (ExecSH on UNIX, ExecDOS on Windows), and execute an echo command. For example:
echo <TOTAL>#RecordCount#</TOTAL> >> #FileName#
(In this example I have shown RecordCount and FileName as job parameters; you can modify the technique to use variables and other mechanisms. Similarly, you could write your own subroutine that used the WriteSeq statement to add the information to the file.
The easiest way is to invoke the subroutine that executes an operating system command (ExecSH on UNIX, ExecDOS on Windows), and execute an echo command. For example:
echo <TOTAL>#RecordCount#</TOTAL> >> #FileName#
(In this example I have shown RecordCount and FileName as job parameters; you can modify the technique to use variables and other mechanisms. Similarly, you could write your own subroutine that used the WriteSeq statement to add the information to the file.