You need to define your procedure like:


dcl-Pr main extpgm('TESTGETAA3');
p PACKED(10);
Mode Char(1);
File Char(15);
*n likeDS(input) ;
Error Char(1000);
Status Char(1);
end-Pr;


dcl-ds input qualified ;

HEADR_IN likeDS(t_Headquarters_Service);
BILL_IN likeDS(t_BillTo_Service);
HEADR_OUT likeDS(t_Headquarters_Service);
BILL_OUT likeDS(t_BillTo_Service);

end-ds;

Then you need to inject the primitive parameters p, mode, file from
variable in path template.

I would suggest you read the 3-part article starting with:
https://developer.ibm.com/tutorials/i-rest-web-services-server1/


"WEB400" <web400-bounces@xxxxxxxxxxxxxxxxxx> wrote on 06/11/2019 03:23:25
PM:

From: anshul narang <narang.anshul@xxxxxxxxx>
To: "Web Enabling the IBM i (AS/400 and iSeries)"
<web400@xxxxxxxxxxxxxxxxxx>
Date: 06/11/2019 03:23 PM
Subject: [EXTERNAL] Re: [WEB400] IWS:Multiple data structures Input
in web-services
Sent by: "WEB400" <web400-bounces@xxxxxxxxxxxxxxxxxx>

Thanks Nadir and Martin.

I declared the datastructure containing the nested structure.

dcl-Pr main extpgm('TESTGETAA3');
*n likeDS(input) ;
end-Pr;

dcl-Pi main ;
Input1 likeDS(input) ;
end-Pi;

dcl-ds input qualified ;
p PACKED(10);
Mode Char(1);
File Char(15);
HEADR_IN likeDS(t_Headquarters_Service);
BILL_IN likeDS(t_BillTo_Service);
HEADR_OUT likeDS(t_Headquarters_Service);
BILL_OUT likeDS(t_BillTo_Service);
Error Char(1000);
Status Char(1);
end-ds;

So now the issue is how do I pass value of billin/p/mode only as these
values will not be always present(sometimes blanks) in the input parm
datastructure.
What would be the input source type as well.

My aim is to create some driver program which can be flexible enough to
take the diff parameters and process accordingly.


Thank you all the help .




On Tue, Jun 11, 2019 at 3:39 PM Booth Martin <booth@xxxxxxxxxxxx> wrote:

a data structure can hold data structures. Make a data structure. say
"dataOutDS", that contains "p" through "status" and then have one parm
of "dataOut like(dataOutDS)"

On 6/11/2019 2:16 PM, anshul narang wrote:
HI All

I am facing peculiar situation as I have program which has multiple
data
structures in web services.

dcl-Pi main ;
p Packed(10);
Mode Char(1);
File Char(15);
HEADR_IN likeDS(t_Headquarters_Service);
BILL_IN likeDS(t_BillTo_Service);
HEADR_OUT likeDS(t_Headquarters_Service);
BILL_OUT likeDS(t_BillTo_Service);
Error Char(1000);
Status Char(1);
end-Pi;
--
This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400)
mailing
list
To post a message email: WEB400@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://urldefense.proofpoint.com/v2/url?

u=https-3A__lists.midrange.com_mailman_listinfo_web400&d=DwICAg&c=jf_iaSHvJObTbx-
siA1ZOg&r=1i-jGlz0-JTK1aLHcsU-

ew&m=x4fXgp_aH7KYhqNbxckRQku4g9LAQCrP_4cXgs9HcbQ&s=eCyJXwaeNFcAnR4C1Jl9jOJxKMcNEBYce9tLaQqNKLU&e=
or email: WEB400-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://urldefense.proofpoint.com/v2/url?
u=https-3A__archive.midrange.com_web400&d=DwICAg&c=jf_iaSHvJObTbx-
siA1ZOg&r=1i-jGlz0-JTK1aLHcsU-

ew&m=x4fXgp_aH7KYhqNbxckRQku4g9LAQCrP_4cXgs9HcbQ&s=ux8ZnNCKwiAvhZ3tf81ZgfH-
pJ5AH0-jfu2I1vu5Iew&e= .





As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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.