You don't need to know in advance. The question I asked was about doing a copy 
of a delimited string (in my use case, blank terminated) with explicit bounds 
on the source and target sizes. TROO comes closest to doing what I want, but it 
has that pesky alignment requirement.

-- 
Shmuel (Seymour J.) Metz
http://mason.gmu.edu/~smetz3
עַם יִשְׂרָאֵל חַי
נֵ֣צַח יִשְׂרָאֵ֔ל לֹ֥א יְשַׁקֵּ֖ר



________________________________________
From: IBM Mainframe Discussion List <[email protected]> on behalf of 
Robin Vowels <[email protected]>
Sent: Monday, October 28, 2024 10:33 PM
To: [email protected]
Subject: Re: Bounded string move?

Caution: This email did not originate from George Mason’s mail system. Do not 
click links or open attachments unless you recognize the sender and know the 
content is safe.


On 2024-10-23 06:58, Seymour J Metz wrote:
> MVCL has a source length and a destination length.
> An S0C4 would indicate that one of those lengths was wrong.
> If the source string is 10 bytes long then the source length
> should be 10 even if the destination length is 512.

But with a blank-terminated string, you do not know in advance
how long the string is.

If you know how long the source is (presumably longer than
the actual blank-terminated string) you can move the entire area
using MVCL.
This will move as well the blank that terminates the string.

You can do a byte-by-byte move using an explicit move that
includes both a test for blank as well as a test for the
total number of bytes in the source area.

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN


----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to