|
I'm still trying to create an XML document using the IFS techniques described in Scott Klement's book. I am able to create the document in the IFS however am having a problem with the length of the document name. The prototype as described in Scott's book is: d open pr 10i 0 extproc('open') d path * value options(*string) d oflag 10I 0 value d mode 10U 0 value options(*nopass) d codepage 10U 0 value options(*nopass) I have written a wrapper for this code and pass in a folder name and document name through the following parameter interface: pcrtXMLDoc B Export d crtXMLDoc PI 1N d FlrPth 256 const d varying d DocNam 40 const d varying d ErrId like(ref.msgid) I thought that by declaring the parameters (FlrPth & DocNam) as varying I could cater for the various lengths that these strings might be passed with. In the crtXMLDoc procedure I do the following to open/create the document: I declare docId as a module variable: d docID s 256A I populate it with the following and invoke the crtXMLDoc procedure: C EVAL docID= %trim(FlrPth) + %trim(DocNam) + x'00' C EVAL FilDes = open(%addr(DOCID) C : O_CREAT+O_TRUNC+O_WRONLY C : (6*64)+(6*8)+(6)) Ehen I look at the file name in the IFS it seems to be padded out to the full 256 bytes with blanks. I thought that by using %addr(DOCID) I would match the prototype requiring a pointer, and appending the x'00' would make it a null terminated string. Any advice? Mike Pantzopoulos Programmer EIG-Ansvar Limited Tel : 61 (3) 8630 3193 Fax: 61 (3) 9614 2740 Mob: 0403 809 442 ********************************************************************************************************* This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you are not the intended recipient, any use, disclosure or copying of this message is unauthorised. If you have received this message in error, please reply using the sender's email address. This footnote confirms that this email message has been scanned for computer viruses. EIG-Ansvar Limited does not accept liability for any loss or damage, whether caused by our own negligence or not, that results from a computer virus or defect in the transmission of this email or any attached file. EIG-Ansvar Limited - Australia (A.B.N. 21 007 216 506) Email : insure@xxxxxxxxxxxxxxxx Eig-Ansvar Limited - New Zealand Email : insure@xxxxxxxxxxxxxxxx *********************************************************************************************************
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.