|
No biggie guys!
Yes, lets keep the standard high on this forum.
Jay
On Mon, May 18, 2020 at 7:09 PM Jon Paris <jon.paris@xxxxxxxxxxxxxx>
wrote:
For some reason Jay's response did not reach me. Due to to the vagariesalways
of gmail it may show up in a few hours.
So I will repeat here what I said to Nathan which is that I apologize to
Jay if indeed these were genuine code samples he was posting.
I took a shortcut and was wrong and I apologize.
On May 18, 2020, at 6:29 PM, Vernon Hamberg <vhamberg@xxxxxxxxxxxxxxx>wrote:
The main thing to avoid is to have product recommendations by the vendor
Hi Jay
Sharing source is fine - I suspect you already know the difference now!
look like advice from the community of a solution to a question. You
said something was a product of yours, so I wasn't too concerned -still, I
and others here treasure this resource and are glad David puts a prettyJon
high fence around it.
would that been better? Just saved time by posting the entire link.
Regards and thanks
Vern
On 5/18/2020 3:20 PM, Jay Vaughn wrote:
Sorry. Will try and remember nxt time.
If I just posted the program source code instead of the entire link
try and remember next time.
Not sure how sharing source code is violation? But whatever. I will
of the advertisements without the ability to <delete before read>.
Jay
On May 18, 2020, at 4:13 PM, midrangel@xxxxxxxxxxxxxxxxx wrote:
I've been waiting for David to say something, buy I agree, I'm tired
--
Jim Oberholtzer
Agile Technology Architects
-----Original Message-----
From: RPG400-L <rpg400-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of
Paristhis
tagging things with <Vendor response> when you do this.Sent: Monday, May 18, 2020 3:05 PM
To: RPG programming on IBM i <rpg400-l@xxxxxxxxxxxxxxxxxx>
Subject: Re: JSON Error Message
Jay - maybe it is just me but I think it really is time you started
wrote:
On May 18, 2020, at 4:00 PM, Jay Vaughn <jeffersonvaughn@xxxxxxxxx>
Jack,
Sql json functions can look complex on the service but it can easily
be implemented using a programming approach I take in something I've
developed. Take a look at the sql json api program at the end of
structures.document to see how you can easily build complicated json
Althoughdifferent related objects).The idea is to keep them strings and create multiple procedures to
keep appending to the json structure (ie. the
getJsonResponseObject_01 procedure can be replicated many times for
wrote:
https://jeffersonvaughn.com/gallery/coreiRST%20Overview.pdf
Jay
On Mon, May 18, 2020 at 2:33 PM Jack Prucha <Jack.Prucha@xxxxxxx>
Hello Jon,
I attended your RPG/DB2 seminars in the suburbs of Chicago.
hotel.I live far from there now I grew up a few miles away from the
{"id":1,"userId":10415785,"accountNumber":null,"dateOfBirth":"1999-08out ofIt was convenient to visit family and save the company some $ by
having my sister pick me up at the airport.
Yes, I successfully validated with JSONLINT. Copied the results
the Run SQL Scripts result window.
This is what I pasted in:
-12","name":{"id":4,"firstName":"Arun","middleName":null,"lastName":"
Antonio","state":"TX","postalCode":"78256-1041","country":"US","countSashidhar","suffix":null},"permanentAddress":{"id":5,"street":"999
Chase Hill Blvd Apt 922","street2":null,"city":"San
Antonio","state":"TX","postalCode":"78256-1041","country":"US","county":null},"identification":"2001","identificationType":"SSN","contact":{"id":2,"mobilePhone":"","textOptIn":false,"homePhone":"","workPhone":"","email":"y":null},"mailingAddress":{"id":3,"street":"999
Chase Hill Blvd Apt 922","street2":null,"city":"San
type":"IND","subType":"UTMA","beneficiary":{"id":7,"name":{"id":8,"fi","emailIsValid":false},"account":{"id":6,"status":"KS","dsad@xxxxxxx
rstName":"Arun","middleName":null,"lastName":"J","suffix":null},"dob"
:"1969-09-18","identification":"2001","identificationType":"SSN","sta
teOfResidence":"NC"},"investment":{"id":10,"investmentOptions":[{"inv
estmentOptionId":"cd","percentContribution":3},{"investmentOptionId":
"de","percentContribution":97}]},"contribution":{"id":13,"amount":100
01.1,"paymentMethod":{"paymentType":"ACH","id":11,"as400Id":0,"routin
gNumber":"999999999","newRoutingNumber":"000000000","bankName":"STATE
UNION","accountNumber":"999999999","accountType":"C","accountName":nuEMPLOYEES CREDIT
ll,"status":"A","preferred":false,"saveForFuture":true},"frequency":"
09:31:33","completedDate":null,"submissionDate":null,"isReadProgramDeONCE"},"application":{"id":9,"startDate":"2020-03-31
scription":true,"isAgreedToTerms":true,"electronicSignature":true},"e
thatJonStatements":true}}
The SQL JSON looked complex. I'll research that idea.
Thx
Jack
-----Original Message-----
From: RPG400-L <rpg400-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of
Paris
Sent: Monday, May 18, 2020 2:03 PM
To: RPG programming on IBM i <rpg400-l@xxxxxxxxxxxxxxxxxx>
Subject: Re: JSON Error Message
Have you validated the JSON with something like JSONLINT ? I have
found several times that I had invisible characters in the JSON
DATA-INTOscrewed it up.
It would also help if you showed the json and not just the DS.
Since you are already using SQL to access the JSON why use
thewrote:and not just use the SQL abilities?
On May 18, 2020, at 12:57 PM, Jack Prucha <Jack.Prucha@xxxxxxx>
a simple proof of concept many months ago and test documents, I
I'm working with our web team who is sending me a JSON document.
After
received the first real output from the web process.
After changing my DS to look more like the output of YAJLGEN, I'm
getting this error message out of YAJLINTO
1002: lexical error: invalid char in json text.█ The parser for
JSONdata usingDATA-INTO operation detected error code 1002.mark. I don't see any unusual characters when viewing the JSON
The unprintable character displays on a green screen as a question
Run SQL Scripts or in debug.
Any suggestions about how to fix this? I tried filtering the
withx'40'.hoping to make sure that there's no unprintable characters under
wrkContent = %ScanRpl(x'000102030405060708090A0B0C0D0E0F' +
'101112131415161718191A1B1C1D1E1F' +
'202122332425262728292A2B2C2D2E2F' +
'303132333435363738393A3B3C3D3E3F':
' ':wrkContent);
We're on 7.3. The web process inserts a record into a db2 file
a.wtContentaCLOB column. This is what the column definition looks like:
Transaction_Content FOR WTCONTENT CLOB ALLOCATE(100) CCSID 37
NOT NULL DEFAULT '' )
This is the JSOSN code from the program:
EXEC SQL DECLARE CWE100R0 CURSOR FOR
SELECT a.wtRecID, a.wtWebID, a.wtSts, a.wtStsDte,
orFROM cvWebTx Aattached to it, has been sent from an email account of College
EXEC SQL FETCH NEXT FROM CWE100R0 INTO
:wtRecID, :wtWebID, :wtSts, :wtStsDte, :wrkContent;
Dcl-s wrkContent SQLTYPE(Clob:128000);
// Extract data from JSON document (cvWebTX.wtContent)
Data-Into txJSONDoc
%Data(wrkContent:'AllowExtra=Yes ' +
'doc=string ' +
'AllowMissing=Yes ' +
'Case=Convert ' +
'CountPrefix=Count_')
%Parser('YAJLINTO':'{"value_null":" "}');
Thanks in Advance
Jack
[CFNC]
This email, including any documents, files, or previous email
messages
Foundation Inc., (CFI) and may contain confidential, proprietary,
bylegally privileged information belonging to CFI. If you are not the
intended recipient, any dissemination, distribution, or copying of
this email or its attachments is strictly prohibited. If you have
received this email in error, please immediately notify the sender
postemail and destroy the original email and any attachments.
--
This is the RPG programming on IBM i (RPG400-L) mailing list To
posta message email: RPG400-L@xxxxxxxxxxxxxxxxxx To subscribe,related questions.
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
Help support midrange.com by shopping at amazon.com with our--
affiliate
link: https://amazon.midrange.com
This is the RPG programming on IBM i (RPG400-L) mailing list To
posta 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
--
This is the RPG programming on IBM i (RPG400-L) mailing list To
post aa 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
This is the RPG programming on IBM i (RPG400-L) mailing list To
unsubscribe,message email: RPG400-L@xxxxxxxxxxxxxxxxxx To subscribe,
arelated questions.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
affiliate
Help support midrange.com by shopping at amazon.com with our
link: https://amazon.midrange.com--
This is the RPG programming on IBM i (RPG400-L) mailing list To post
message email: RPG400-L@xxxxxxxxxxxxxxxxxx To subscribe, unsubscribe, or--
change list options,
https://archive.midrange.com/rpg400-l.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
related questions.
Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription
affiliate link: https://amazon.midrange.com
Help support midrange.com by shopping at amazon.com with our
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
affiliate link: https://amazon.midrange.com
Help support midrange.com by shopping at amazon.com with our
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
link: https://amazon.midrange.com
Help support midrange.com by shopping at amazon.com with our affiliate
--
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
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 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.