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



Dan,

If you change the interface to the program into a command you can make the parameter a varying string where the first two bytes will tell you how long the string is and that way you won't get garbage at the end of the string. Also, you can pass this directly to a RPG program as a Varying Length Character field.

Thanks,

Marvin
No trees were killed in the sending of this message, but a large number of electrons were terribly inconvenienced

------------------------------

message: 2
date: Tue, 26 Apr 2016 09:56:35 -0400
from: Dan <dan27649@xxxxxxxxx>
subject: 3000-char CL parm padded with hex zeros

CL program PGMA submits CL program PGMB, passing three parameters: A10, B10, C3000. The latter field is a 3000-char variable that PGMA builds.
Before the SBMJOB CMD(CALL PGMB PARM(A10, B10, C3000), I have a DMPCLPGM that shows that C3000, at the end of the content PGMA puts in it, is padded with blanks (x'40'). However, upon entry into PGMB, the padded blanks convert to hex zeros (x'00'), and this creates a problem when I use the %trim built-in. I.e., nothing gets trimmed.

Is this the expected behavior? I vaguely recall issues where garbage shows up in parameters when passing a literal that is shorter than the receiving parameter, but in this case, both programs have the same variable definitions for the three parameters.

- Dan


------------------------------
Notice: This e-mail transmission may contain information that is proprietary, privileged and/or confidential and is intended exclusively for the person(s) to whom it is addressed. This message may also contain Protected Health Information (PHI) and must be treated confidentially and handled in accordance with HIPAA and other federal and state privacy laws. Any use, copying, retention or disclosure by any person other than the intended recipient or the intended recipient's designees is strictly prohibited. If you are not the intended recipient or their designee, please notify the sender immediately and delete this e-mail (and any accompanying attachments).

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.