I wrote a small subroutine to right justify a field. I started scanning
left at the end of the field and counted spaces until I found a non-blank
character. Then I subtracted the number of blanks from the starting
address of the field (which was prefixed with spaces) and then moved the
data from
If your routine is to be used heavily there is a much faster way to do
left justifications. It is to use a TRTE with a 256-byte table that
defines only a blank, x'40', as a licit character. This approach
yields the zero-origin offset of the leftmost non-blank directly.
If I were writing such a
If this is your field I wouldn't want to right-justify it based on
finding the first blank with TRT/R/E.
--
Mike Harding
z/VM System Support
/sp
IBM Mainframe Assembler List ASSEMBLER-LIST@listserv.uga.edu wrote on
05/15/2014 12:00:52 PM:
From: Blaicher, Christopher Y.
Using TRTRE makes it very simple. Build a TRT table with all bytes non-zero
except the C' ' byte and execute the instruction. After the instruction R1
will point at the 'D' in field. TRTRE works right to left rather than left to
right.
TRTTABLE DC256XL1'04'
ORG TRTTABLE+C'
Won't the TRTRE stop at the first blank in the field?
If so, it will stop at the right end, not at the d.
Maybe I've misread the pOps.
-Original Message-
From: IBM Mainframe Assembler List [mailto:ASSEMBLER-LIST@LISTSERV.UGA.EDU] On
Behalf Of Blaicher, Christopher Y.
Sent: Thursday, May
On Thu, 15 May 2014 12:49:13 -0700, Hardee, Chuck wrote:
Won't the TRTRE stop at the first blank in the field?
If so, it will stop at the right end, not at the d.
Maybe I've misread the pOps.
It depends upon how you code your translate table.
--
Tom Marchant
Unless I misunderstood, it was stated that it was coded with only 1 non-zero
entry, the space.
Charles (Chuck) Hardee
Senior Systems Engineer/Database Administration
CCG Information Technology
Thermo Fisher Scientific
300 Industry Drive
Pittsburgh, PA 15275
Direct: 724-517-2633
FAX: 412-490-9230
As I thought, indeed still think, I had made clear, it will stop on
the first, leftmost or rightmost, non-blank.
John Gilmore, Ashland, MA 01721 - USA
On 5/15/2014 12:13 PM, John P Kalinich wrote:
I wrote a small subroutine to right justify a field. I started scanning
left at the end of the field and counted spaces until I found a non-blank
character. Then I subtracted the number of blanks from the starting
address of the field (which was
On 15 May 2014 15:00, Blaicher, Christopher Y. cblaic...@syncsort.com wrote:
The problem with TRT is it validates the whole TRT table before it starts to
do the TRT.
I think you are speaking of access exceptions for the table (the
second operand), which because of the instruction definition
10 matches
Mail list logo