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



Scott,

The point is I don't have to type them with EXTNAME...

dcl-ds image extname('MYLIB/MYFILE') alias end-ds;
data-gen image %DATA(jsonMsg) %GEN('YAJL72/YAJLDTAGEN');

FYI: (I'm dealing with a trigger buffer here)

I'd hope for two lines of code and done. Since the long names in our table
use underscores, ex QTY_ON_HAND, I was hoping for a way to have it added to
the JSON as "qty_on_hand":0, rather than "QTY_ON_HAND":0

I can live with all caps :)

Charles


On Fri, Jun 18, 2021 at 11:36 AM Scott Klement <rpg400-l@xxxxxxxxxxxxxxxx>
wrote:

Charles,

If you have a field defined in a file like CUSTNAME how should DATA-GEN
know whether you want it to be CUSTNAME, CustName, Custname or custname?

An option like case=convert doesn't seem like it could work here. It'd
have to have detail for the capitalization of all of the fields
everywhere in the document, not just a general-purpose directive like
'convert it for me'.

Since you have to type them all, anyway, why not type the actual data
structure instead of using EXTNAME? I don't see how the external
definition is buying you anything.

-SK

On 6/18/2021 12:25 PM, Charles Wilt wrote:
All,

working with DATA-GEN using Scott's awesome YAJLDTAGEN.

Problem I have is that the DS I'm passing to YAJLDTAGEN is defined with
EXTNAME(MYFILE) alias;

So I'm seeing long names in my JSON doc, but they are in all caps.

It doesn't appear that "case=convert" is an option for DATA-GEN like it
is
for DATA-INTO.

Is there some other way to get the generated JSON doc to use the
lowercase
versions of the table names?

Thanks!
Charles Wilt
--
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.