×
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.
Normally for varChar() fields, I'd just append them (trimming the field you're adding, if necessary).
rjsonstring += jrddta;
I can't really think of anything special about returning a varChar(). If it's large, you probably want to specify rtnParm, but that's about it.
HTH
-----Original Message-----
From: Don Brown [mailto:DBrown@xxxxxxxxxx]
Sent: Tuesday, May 08, 2018 11:38 PM
To: Rpg400 Rpg400-L <rpg400-l@xxxxxxxxxxxx>
Subject: Variable length fields
System is V7R3.
I have recently started using variable length fields and a current project required a large json string.
Can anyone suggest a good resource for examples with using variable length fields. Especially where they are used a part of a return from a procedure ?
While the reasons why are not so important I have a temporary file where if have a field defined with a length of 30000 character
JRDDTA 30000 VARLEN
There can be multiple records in this file making up a json string currently with a maximum length of 100000 (but this may increase)
My question is how would you read multiple records from my work file and construct the json string.
I ended up doing as follows but it seems not the best option ???
I initially set the length of my variable to the maximum and at the end reset to the actual trimmed length.
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.