Free-form input to a program that I am writing. Each parameter statement has either one or two labels, separated by blanks. I'm only concerned with EBCDDIC.
-- Shmuel (Seymour J.) Metz http://mason.gmu.edu/~smetz3 עַם יִשְׂרָאֵל חַי נֵ֣צַח יִשְׂרָאֵ֔ל לֹ֥א יְשַׁקֵּ֖ר ________________________________________ From: IBM Mainframe Discussion List <IBM-MAIN@LISTSERV.UA.EDU> on behalf of Paul Gilmartin <0000042bfe9c879d-dmarc-requ...@listserv.ua.edu> Sent: Monday, November 4, 2024 11:52 AM To: IBM-MAIN@LISTSERV.UA.EDU 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 Mon, 21 Oct 2024 23:28:13 +0000, Seymour J Metz wrote: >If I know the lengths of an input string and the length of a buffer, I can >specify a pad character and copy it with MVCL. If I know that it is delimited >by, e.g., a blank, I can use MVST but I run the risk of a buffer overrun. Is >there a quick way to copy a delimited string without overrunning either the >input or output buffer and without resorting to TRT? > (Thread TLDR) This begs for context. Are you extracting tokens from a CMS, tSO, UNIX, ... command line? From program source? Or from a formatted data file? The delimiter set may not be a singleton. That is handled well by TRT, poorly by such as char *strchr(const char *s, int c); Can you simplify the problem by appending a delimiter? -- gil ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN