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



I have a service pgm and procedure with a DS defined for a JSON response from an API.

The JSON DS is defined in the d-specs of the service program (not in the procedure).

Even though I have INZ keyword on the JSON DS, it still contains data from the previous call. What is the right way to handle this?

1. Clear JSON in calc specs?
2. Move the DS inside the procedure?

This is defined as a global variable in the module source (above the procedures). I'm thinking this only gets initialized the first time a calling PGM calls the procedure. But I'm not sure how to best fix this.

json(1).delivery_line_2 is the actual data field where I'm able to see it not initialized on subsequent calls

dcl-ds json qualified dim(3) inz;
input_id varchar(36);
input_index int(5) inz(0);
candidate_index int(5) inz(0);
delivery_line_1 varchar(50) inz('');
delivery_line_2 varchar(50) inz('');
last_line varchar(64) inz(''); // City, State & Zip combined
delivery_point_barcode varchar(12) inz(''); // POSTNET barcode
dcl-ds components;
primary_number varchar(10) inz(''); // House, P.O. or Building Nbr

[Logo]<https://www.totalbizfulfillment.com/> Greg Wilburn
Director of IT
301.895.3792 ext. 1231
301.895.3895 direct
gwilburn@xxxxxxxxxxxxxxxxxxxxxxx<mailto:gwilburn@xxxxxxxxxxxxxxxxxxxxxxx>
1 Corporate Dr
Grantsville, MD 21536
www.totalbizfulfillment.com<http://www.totalbizfulfillment.com>

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.