From: "Steve Comstock" <[email protected]>
Sent: Wednesday, July 16, 2014 11:10 PM
There is no pattern that will do that simply: it takes some
code. Given your input looks like three bytes packed, lets
set up some fields:
Data_in ds PL3
Data_out ds CL7
Edpat dc x'40202020202060'
Then your code might look something like this:
mvc Data_out,Edpat
la 1,Data_out+4
edmk Data_out,Data_in
cli Data_out+6,c'-'
je positive
bctr R1,0
mvi 0(R1),c'-'
mvi Data_out+6,c' '
positive ds 0h
That's an interesting thought. Since the minus sign is present only when the
value is negative, a simpler method affords :-
LA 1,DATA_OUT+5
EDMK DATA_OUT,DATA_IN
BCTR 1,0
MVC 0(0,1),DATA_OUT+6
MVI DATA_OUT+7,' '
with the pattern changed to x'40202020212060'
---
This email is free from viruses and malware because avast! Antivirus protection
is active.
http://www.avast.com