I have an array data structure that has some varchar subfields, initialized with INZ(''). There is no space between the quotes, which appears to set the length to 0 for all rows. That's what I want. All's cool.
I then call a procedure that gets some values for two of the four subfields, and loads three rows with those values. That's cool too. What isn't so cool is the two fields that should be untouched by the called procedure get blank-filled, and I don't know why, or how best to prevent that. I could spin through a for-loop and load the target DS from the results of the called procedure, but I thought I might not have to.

Calling program defines the target ds as:

DCL-DS KnownUsersDS QUALIFIED DIM(64);
Domain CHAR(16);
UserID VARCHAR(32) INZ('');
ChildOf VARCHAR(32) INZ('');
IsArchived IND;
END-DS;

Called Procedure only retrieves values for "Domain" and "UserID", so it has a ds defined as:

DCL-DS UserIDs QUALIFIED DIM(64);
Domain CHAR(16);
UserID VARCHAR(32) INZ('');
END-DS;

The UserIDs data structure is what is passed back to the caller, and gets stuffed into the 4-subfield array data structure with:

KnownUsersDS = GetUserIDsFromNova(acct : phone : domainsDS);

After the call, all 64 rows of the ChildOf subfield get blanks (including the length bytes). What I find curious is that the UserID subfield for the 61 unfilled rows remain empty with length = 0.

We're at v7.1 here.

So have I pushed my luck trying to load only two of four subfields by making it the receiver of the call? (seeems to work except for trashing the unused subfields).

Michael Koester

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