[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Using an array DS in callback of http_url_post_xml
Note: This e-mail is subject to the disclaimer contained at the bottom
of this message.
_________________________________________________________________
I think this is probably a generic RPG issue, but it's part of an
attempt to use an array DS in place of the rate parameter used in the
HTTP Exchange example, so I was hoping it's an easy problem for you.
The service I'm using returns an array of 20 with a number of fields.
I want to fill it in the callback procedure and then use it in the
code after the invocation of http_url_post_xml .
Here is the DS definition in the main body of the program:
d getCoverOptionResponse...
d ds qualified
d dim(20)
d BuildingsFlag 1A varying
d ContentsFlag 1A varying
d CoverLevel 1A varying
d CoverOption 4A varying
d CoverOptionCode...
d 10A varying
d ProductFilter 3A varying
Here is the prototype:
D getResponse PR
D response_arr likeds(getCoverOptionResponse)
D depth 10I 0 value
D name 1024A varying const
D path 24576A varying const
D value 32767A varying const
D attrs * dim(32767)
D const options(*varsize)
And here is the PI in the procedure:
p getResponse B
d getResponse PI
d response_arr likeds(getCoverOptionResponse)
d depth 10I 0 value
d name 1024A varying const
d path 24576A varying const
d value 32767A varying const
d attrs * dim(32767)
d const options(*varsize)
Here is the code failing compilation:
Select;
When name = 'ns1:CoverOptionCode';
Index += 1;
When name = 'ns1:BuildingsFlag';
response_arr(index).BuildingsFlag= value;
When name = 'ns1:ContentsFlag';
response_arr(index).ContentsFlag= value;
When name = 'ns1:CoverLevel';
response_arr(index).CoverLevel= value;
When name = 'ns1:CoverOption';
response_arr(index).CoverOption= value;
When name = 'ns1:ProductFilter';
response_arr(index).ProductFilter= value;
EndSl;
I am getting:
*RNF7030 30 5 The name or indicator is not defined.
*RNF0528 20 5 Index is not allowed for name that is not an array;
On the lines referencing response_arr.
Appreciate your time Scott.
_________________________________________________________________
The information transmitted in this message and its attachments (if
any) is intended only for the person or entity to which it is
addressed.
The message may contain confidential and/or privileged material. Any
review, retransmission, dissemination or other use of, or taking of
any action in reliance upon this information, by persons or entities
other than the intended recipient is prohibited.
If you have received this in error, please contact the sender and
delete this e-mail and associated material from any computer.
The intended recipient of this e-mail may only use, reproduce,
disclose or distribute the information contained in this e-mail and
any attached files, with the permission of the sender.
This message has been scanned for viruses.
_________________________________________________________________
-----------------------------------------------------------------------
This is the FTPAPI mailing list. To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------