On 7/16/2014 9:41 AM, Tom Marchant wrote:
On Wed, 16 Jul 2014 08:52:32 -0600, Steve Comstock wrote:

Actually, some improvements / corrections are included below
Data_in  ds  PL3
Data_out ds  CL7
* Edpat    dc  x'40202020202060'
   Edpat    dc  x'40202020212060'
                          ~~


Then your code might look something like this:

            mvc    Data_out,Edpat
*            la     1,Data_out+4
              la     R1,Data_out+5
                                 ~
            edmk   Data_out,Data_in
            cli    Data_out+6,c'-'
*            je     positive
              jne    positive
              ~~~
            bctr   R1,0
            mvi    0(R1),c'-'
            mvi    Data_out+6,c' '
positive  ds     0h

Steve,

Data_out+6 will always be c'-'. The only values that have any significance for 
EDIT and
EDMK are X'20', X'21' and X'22'. Any other value is a Message byte and will be 
left
undisturbed with the edit mask that you have defined. With your initial edit 
mask it might
have been replaced with the fill character.


The first significant character (non-leading zero or zero
after significant start), turns on the s-trigger. The presence
of a positive sign in the last data byte will turn the s-trigger
off and so any remaining message characters will be replaced
by the fill character.

The two edit patterns work the same, of course, except when
there are four leading zeros; in that case the s-trigger is
not turned on (thus not setting the R1 value correctly).


I no longer have access to a system to test / demonstrate / verify
this, but I believe it to be true.

-S

Reply via email to