× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Many thanks Bob. With the field containing the path to the file in the IFS
declared varying and the path name correctly specified that works well.
One thing that did trip me up was the fact that the Cobol programme which
created the xml file ( XML GENERATE) needs a 01 level above the Copy DDS for
the data structure used and the name of this 01 level is inserted into the XML
flux and thus has to be reflected in the path name
Eg
<DS-XML> (01 level in CBL programme)
<RSWPOSTIT> (DDS record name copied)
xml data
</RSWPOSTIT>
</DS-XML>

With this the XML-INTO from the RPG programme works just fine.

for get_data = 1 to ct ;
ifs_file = %trimr('/home/c_papworth/' +
'fswx' + get_dataa + '.xml') ;
xml-into rswpostit %xml(ifs_file :
'doc=file case=any allowmissing=yes path=ds-xml/RSWPOSTIT' +
' allowextra=yes' ) ;
%occur(ws_save_ds) = get_data ;
ws_save_ds = rswpostit ;
endfor ;

Thanks again



-----Message d'origine-----
De : rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] De la
part de rpg400-l-request@xxxxxxxxxxxx
Envoyé : mercredi 18 avril 2007 19:00
À : rpg400-l@xxxxxxxxxxxx
Objet : RPG400-L Digest, Vol 6, Issue 363

Send RPG400-L mailing list submissions to
rpg400-l@xxxxxxxxxxxx

To subscribe or unsubscribe via the World Wide Web, visit
http://lists.midrange.com/mailman/listinfo/rpg400-l
or, via email, send a message with subject or body 'help' to
rpg400-l-request@xxxxxxxxxxxx

You can reach the person managing the list at
rpg400-l-owner@xxxxxxxxxxxx

When replying, please edit your Subject line so it is more specific
than "Re: Contents of RPG400-L digest..."


*** NOTE: When replying to this digest message, PLEASE remove all text
unrelated to your reply and change the subject line so it is meaningful.

Today's Topics:

1. RE: XML question (bob@xxxxxxxxxxxx)


----------------------------------------------------------------------

message: 1
date: Wed, 18 Apr 2007 09:56:29 -0700
from: bob@xxxxxxxxxxxx
subject: RE: XML question

You don't show your declaration for the IFS_FILE field.
If it is a VARYING field, then it may be a "path=" missing from the options
parameter.
If it is not VARYING, then you need to do a %trimR(ifs_file) to delete the
trailing blanks off the field name.


-Bob Cozzi
www.RPGWorld.com


-------- Original Message --------
Subject: XML question
From: "PAPWORTH Paul" <Paul.Papworth@xxxxxxx>
Date: Wed, April 18, 2007 8:54 am
To: <rpg400-l@xxxxxxxxxxxx>

Does anybody have an idea what I'm doing wrong with my XML-INTO code
:- I get this call getxml No such path or directory. La prparation
pour l'analyse syntaxique XML a chou avec le message CPE3025. (
Preparation failed with message CPE) La prparation pour l'analyse
syntaxique XML a chou avec le message CPE3025. Exception non
intercepte la ligne 143 My code is as follows for get_data = 1 to
ct ; ifs_file = '/home/c_papworth/' + 'fswx' + get_dataa + '.xml' ;
xml-into dswpostit %xml(ifs_file : 'doc=file case=any
allowmissing=yes') ; %occur(ws_save_ds) = get_data ; ws_save_ds =
dswpostit ; endfor ; The contents og IFS_FILE in debug are :- IFS_FILE
= '/home/c_papworth/fswx0001.xml ' This file exists (I created it
using the XML write from a COBOL programme )You


------------------------------


As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.