|
On May 12, 2025, at 10:06 AM, (WalzCraft) Jerry Forss <JForss@xxxxxxxxxxxxx> wrote:
Got it. Wasn't setting the Response_Length. :(
-----Original Message-----
From: RPG400-L <rpg400-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of (WalzCraft) Jerry Forss
Sent: Monday, May 12, 2025 9:00 AM
To: RPG programming on IBM i <rpg400-l@xxxxxxxxxxxxxxxxxx>
Subject: RE: External RE: Web Service Return DS Array
I did get that working.
Data in pgm looks good.
The service is getting back blanks so need to figure out what I have wrong.
{
"RESPONSE": [],
"FAIL": ""
}
-----Original Message-----
From: RPG400-L <rpg400-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of Jean-Marc DUVAL via RPG400-L
Sent: Monday, May 12, 2025 8:53 AM
To: RPG programming on IBM i <rpg400-l@xxxxxxxxxxxxxxxxxx>
Cc: Jean-Marc DUVAL <jean-marc.duval@xxxxxxxxxxx>
Subject: External RE: Web Service Return DS Array
CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.
Hi,
Try something like that :
Dcl-pr WOMOrdTypR;
Envir Char(2);
data likeds data_t dim(20);
Fail Char(100);
End-pr;
Dcl-pi WOMOrdTypR;
Envir Char(2);
data likeds data_t dim(20); Fail Char(100);
End-pi;
dcl-ds data_t template ;
Type Char(2);
Description Char(25);
End-ds;
-----Message d'origine-----
De : RPG400-L <rpg400-l-bounces@xxxxxxxxxxxxxxxxxx> De la part de (WalzCraft) Jerry Forss Envoyé : lundi 12 mai 2025 14:56 À : RPG programming on IBM i <rpg400-l@xxxxxxxxxxxxxxxxxx> Objet : Web Service Return DS Array
ATTENTION : Ce message provient d'une source EXTERNE. Veuillez n'ouvrir les liens ou pièces jointes que si vous êtes sûr de l'expéditeur.
Hi All
Cross posting to Web list as well.
In my current pgm that is called from my Web Server I return arrays for each element.
I want to return a DS array instead.
Current Parameters
Dcl-pr WOMOrdTypR;
Envir Char(2);
Type Char(2) Dim(20);
Description Char(25) Dim(20);
Fail Char(100);
End-pr;
Dcl-pi WOMOrdTypR;
Envir Char(2);
Type Char(2) Dim(20);
Description Char(25) Dim(20);
Fail Char(100);
End-pi;
Which returns this from the service
{
"TYPE": [
"DS",
"EX",
"LT",
"NC",
"RM",
"RW",
"SL",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
""
],
"DESCRIPTION": [
"Drop Ship",
"Expedited Order",
"Literature Packed",
"No Charge",
"Remake",
"Re-Work",
"Standard Lead",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
""
],
"FAIL": ""
}
I want it to return
[
{
"TYPE": "DS",
"DESCRIPTION": "Drop Ship"
},
{
"TYPE": "EX",
"DESCRIPTION": "Expedited Order"
},
{
"TYPE": "LT",
"DESCRIPTION": "Literature Packed"
}
]
How do I define this as a DS so the service returns what I want?
I am looking for some good documentation on templates, I am assuming this is what I want but have never used it.
Subject to Change Notice:
WalzCraft reserves the right to improve designs, and to change specifications without notice.
Confidentiality Notice:
This message and any attachments may contain confidential and privileged information that is protected by law. The information contained herein is transmitted for the sole use of the intended recipient(s) and should "only" pertain to "WalzCraft" company matters. If you are not the intended recipient or designated agent of the recipient of such information, you are hereby notified that any use, dissemination, copying or retention of this email or the information contained herein is strictly prohibited and may subject you to penalties under federal and/or state law. If you received this email in error, please notify the sender immediately and permanently delete this email. Thank You
WalzCraft PO Box 1748 La Crosse, WI, 54602-1748 https://urldefense.com/v3/__http://www.walzcraft.com__;!!J76aczzK!2lKAw_rlQfawtmyHD4qzmvnucrm2gyROdByrS4KZze-utpO4LwhUKFbx5zNa0Hh-4vh6YcnV7sqH4q3QhP1K-XcC$ <https://urldefense.com/v3/__http://www.walzcraft.com__;!!J76aczzK!2lKAw_rlQfawtmyHD4qzmvnucrm2gyROdByrS4KZze-utpO4LwhUKFbx5zNa0Hh-4vh6YcnV7sqH4q3QhP1K-XcC$ > Phone: 1-800-237-1326
--
This is the RPG programming on IBM i (RPG400-L) mailing list To post a message email: RPG400-L@xxxxxxxxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit: https://urldefense.com/v3/__https://lists.midrange.com/mailman/listinfo/rpg400-l__;!!J76aczzK!2lKAw_rlQfawtmyHD4qzmvnucrm2gyROdByrS4KZze-utpO4LwhUKFbx5zNa0Hh-4vh6YcnV7sqH4q3QhDDtCi2B$
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives at https://urldefense.com/v3/__https://archive.midrange.com/rpg400-l__;!!J76aczzK!2lKAw_rlQfawtmyHD4qzmvnucrm2gyROdByrS4KZze-utpO4LwhUKFbx5zNa0Hh-4vh6YcnV7sqH4q3QhOQE99Fe$ .
Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related questions.
--
This is the RPG programming on IBM i (RPG400-L) mailing list To post a message email: RPG400-L@xxxxxxxxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives at https://archive.midrange.com/rpg400-l.
Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related questions.
Subject to Change Notice:
WalzCraft reserves the right to improve designs, and to change specifications without notice.
Confidentiality Notice:
This message and any attachments may contain confidential and privileged information that is protected by law. The information contained herein is transmitted for the sole use of the intended recipient(s) and should "only" pertain to "WalzCraft" company matters. If you are not the intended recipient or designated agent of the recipient of such information, you are hereby notified that any use, dissemination, copying or retention of this email or the information contained herein is strictly prohibited and may subject you to penalties under federal and/or state law. If you received this email in error, please notify the sender immediately and permanently delete this email. Thank You
WalzCraft PO Box 1748 La Crosse, WI, 54602-1748 www.walzcraft.com<http://www.walzcraft.com> Phone: 1-800-237-1326
--
This is the RPG programming on IBM i (RPG400-L) mailing list To post a message email: RPG400-L@xxxxxxxxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives at https://archive.midrange.com/rpg400-l.
Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related questions.
Subject to Change Notice:
WalzCraft reserves the right to improve designs, and to change specifications without notice.
Confidentiality Notice:
This message and any attachments may contain confidential and privileged information that is protected by law. The information contained herein is transmitted for the sole use of the intended recipient(s) and should "only" pertain to "WalzCraft" company matters. If you are not the intended recipient or designated agent of the recipient of such information, you are hereby notified that any use, dissemination, copying or retention of this email or the information contained herein is strictly prohibited and may subject you to penalties under federal and/or state law. If you received this email in error, please notify the sender immediately and permanently delete this email. Thank You
WalzCraft PO Box 1748 La Crosse, WI, 54602-1748
www.walzcraft.com<http://www.walzcraft.com> Phone: 1-800-237-1326
--
This is the RPG programming on IBM i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-l.
Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related questions.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.