Thank you!

I've tried various iterations of using the countprefix option. I was just surprised to see the count of the errors array at "1" when it's received as "null". In this case, I supposed "errors" is present, but the underlying "field" and "messages" are not?

I'm considering creating separate DS for each situation and placing them in nested monitor statements... Or is that "bad form"?
I would expect to receive a "successful" post of the shipment most of the time.

Greg



-----Original Message-----
From: RPG400-L <rpg400-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of Martijn van Breden
Sent: Tuesday, February 24, 2026 4:38 AM
To: RPG programming on IBM i <rpg400-l@xxxxxxxxxxxxxxxxxx>
Subject: Re: Options for YAJLINTO to handle a null array

Hello Greg

We ran into this a while ago and experimented with null indicators and so on but that won't work.
You can use the countprefix keyword instead to handle this. It will be zero with an empty or null array.


Kind regards,

Martijn van Breden

lead software architect



--
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.

Greg Wilburn
Director of IT
301.895.3792 ext. 1231

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

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

This mailing list archive is Copyright 1997-2026 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.