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



Danny,

The reason it did not work is that *NULL in CL is NOT a special value. CL viewed *NULL as '*NULL'. IOW, it saw it as a 5 character constant string.

If you don't want to hardcode the hex 00 in the comparison, define a "null variable":

DCL &Null *CHAR 1 x'00'

-mark

On 11/26/2019 3:45 PM, Danny Hayes wrote:
Larry,

It accepted *NULL, but did not remove them.

Thanks,
Danny

-----Original Message-----
From: MIDRANGE-L<midrange-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of DrFranken
Sent: Tuesday, November 26, 2019 3:37 PM
To: Midrange Systems Technical Discussion<midrange-l@xxxxxxxxxxxxxxxxxx>
Subject: [EXT] Re: Need to replace hex zeroes in a CL variable

External Email: This is an EXTERNAL email do not click links or open attachments unless you know the content is safe. Please use caution with Urgent Requests.


Try the special value *NULL


- Larry "DrFranken" Bolhuis

https://nam04.safelinks.protection.outlook.com/?url=www.Frankeni.com&amp;data=02%7C01%7Cdanny_hayes%40genpt.com%7Ce94132d5bb4b42471c9108d772b06110%7Cb439d764f2cb43eaac052e373c83043e%7C0%7C0%7C637103974182629568&amp;sdata=iLDE0N9ghjRzfDo35xnVNC0UP0225prI8BzlvHHg0cc%3D&amp;reserved=0
https://nam04.safelinks.protection.outlook.com/?url=www.iDevCloud.com&amp;data=02%7C01%7Cdanny_hayes%40genpt.com%7Ce94132d5bb4b42471c9108d772b06110%7Cb439d764f2cb43eaac052e373c83043e%7C0%7C0%7C637103974182629568&amp;sdata=G5qX9%2FDltg2Of%2BHiDvfKuvGovMt5p0VZ2FKOngGr3S4%3D&amp;reserved=0 - Personal Development IBM i timeshare service.
https://nam04.safelinks.protection.outlook.com/?url=www.iInTheCloud.com&amp;data=02%7C01%7Cdanny_hayes%40genpt.com%7Ce94132d5bb4b42471c9108d772b06110%7Cb439d764f2cb43eaac052e373c83043e%7C0%7C0%7C637103974182629568&amp;sdata=8q3yckH9SMOb%2FJu4wBd7kt%2BAckhkLS74iPFbWQX4v%2F4%3D&amp;reserved=0 - Commercial IBM i Cloud Hosting.

On 11/26/2019 3:30 PM, Danny Hayes wrote:
First,



V7 R3 -



I have a CL program that is calling another program to get a file name. The field is 256 characters long.

It has the value for the file name and then the rest is populated with hex zeroes.

The file name is then to be used in the CPYTOIMPF command, and it chokes if there are Nulls in the file name.



I tried %TRIM with no second parm, but that only works for blanks.

I tried %Trim using the second parm, but not sure I specified it right:

VALUE(%TRIM(&FILELABEL 'X"00"')) I tried multiple times and this is the only way I got it to compile.



I initialized the fields to blanks, but when they come back to me the file name has those x'00'.



TIA,

Danny





"This email and any attachments, contain Genuine Parts Company confidential information that is proprietary, privileged, and protected by applicable laws. If you have received this message in error and are not the intended recipient, you should not retain, distribute, disclose or use any of this information and you should destroy this email, any attachments or copies therein forthwith. Please notify the sender immediately by email if you have received this email in error."

--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit: https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.midrange.com%2Fmailman%2Flistinfo%2Fmidrange-l&amp;data=02%7C01%7Cdanny_hayes%40genpt.com%7Ce94132d5bb4b42471c9108d772b06110%7Cb439d764f2cb43eaac052e373c83043e%7C0%7C0%7C637103974182629568&amp;sdata=t%2BA%2FdJU8LkdneyeGgX1OM%2B3mgrvWvdxV0skHfgUnFf4%3D&amp;reserved=0
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives at https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Farchive.midrange.com%2Fmidrange-l&amp;data=02%7C01%7Cdanny_hayes%40genpt.com%7Ce94132d5bb4b42471c9108d772b06110%7Cb439d764f2cb43eaac052e373c83043e%7C0%7C0%7C637103974182639563&amp;sdata=qZGSMTRpoOuHsSrMJFCGr%2F8dgXSHViHq9JB0F2BaG38%3D&amp;reserved=0.

Please contact support@xxxxxxxxxxxx for any subscription related questions.

Help support midrange.com by shopping at amazon.com with our affiliate link: https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Famazon.midrange.com&amp;data=02%7C01%7Cdanny_hayes%40genpt.com%7Ce94132d5bb4b42471c9108d772b06110%7Cb439d764f2cb43eaac052e373c83043e%7C0%7C0%7C637103974182639563&amp;sdata=S2U%2FcCwckOkg0U1iH7aDgvVM6%2F9Jh%2Bzf36oQIVIGKsI%3D&amp;reserved=0

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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.