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



Another twist I'm uncovering when doing DATA-INTO with number_prefix of YAJL_ in YAJLOPTS...

When executing the DATA-INFO in the example below, it does not add YAJL_ to 010 therefore not loading into the Data structure. It does add it on an earlier element in the document. The ONLY difference I can see between the 2 is the example below has the string StoreTotals first then the numeric. In the trace earlier, it shows YAJL_010 as the name, but it is before the string of StoreTotals.

Maybe this is fixed so I may try and install the latest YAJL library, but maybe that is functioning as designed.

-----Original Message-----
From: RPG400-L <rpg400-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of Stephen Piland
Sent: Tuesday, February 2, 2021 1:08 PM
To: rpg400-l@xxxxxxxxxxxxxxxxxx
Subject: YAJLGEN and 'Variable' Named Elements

I'm not sure if I should go back to the vendor and suggest a change in their schema for this, but... I used YAJLGEN utility (which is great) to generate the Data structures to be able to DATA-INTO. A portion of the JSON is below. My issue is with the "010", which is a Register#, gets generated as YAJL_010 as the name of the Data Structure. For this JSON, it could contain information for Registers 001 - 999 (YAJL_001 to YAJL_999). Any ideas on how to not have to create 999 data structures? I know it would have been great if the vendor created an element named Register and store the value in it.

Thanks!!

"NonTillBasedTenders": {
"StoreTotals": {
"CREDIT CARD": {
"VISA": [
{
"CurrencyCode": "USD",
"TransactionCount": 1,
"InAmount": 22.99,
"OutAmount": 0
}
]
}
},
"010": {
"CREDIT CARD": {
"VISA": [
{
"CurrencyCode": "USD",
"TransactionCount": 1,
"InAmount": 22.99,
"OutAmount": 0
}
]
}
}
}
--
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.

Help support midrange.com by shopping at amazon.com with our affiliate link: https://amazon.midrange.com

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