From this code i can only understand that the TDATUM variable which consists a
date is been unpacked and then formatted in DD.MM.YY in variable MAEN
I am not able to understand the last instruction MVZ What it is doing what will
the value in variable MAEN after this operation.
UNPK DATE,TDATUM
MVC MAEN(2),DATE
MVI MAEN+2,C'.'
MVC MAEN+3(2),DATE+2
MVI MAEN+5,C'.'
MVC MAEN+6(2),DATE+4
MVZ MAEN+7(1),=X'FF'
Please Look into it ASAP the answer for this will be greately appreciated
Waiting for your reply
Regards
Vijay
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
will be packed decimal with the last (rightmost)
nibble being the hex value "C". When it got
unpacked, the last byte became X"C-",
and you need it to be X"F-" so it can be
standard ebcdec. You could have used
OI, but the MVZ accomplishes the same thing,
it puts the zone part to be F instead of C.
Jerry Burnett [email protected]
: Hello HI
: I have a MVS Assembly code which is to be Impact Analysis for year 2000
: From this code i can only understand that the TDATUM variable which consists a
: date is been unpacked and then formatted in DD.MM.YY in variable MAEN
: I am not able to understand the last instruction MVZ What it is doing what will
: the value in variable MAEN after this operation.
: UNPK DATE,TDATUM
: MVC MAEN(2),DATE
: MVI MAEN+2,C'.'
: MVC MAEN+3(2),DATE+2
: MVI MAEN+5,C'.'
: MVC MAEN+6(2),DATE+4
: MVZ MAEN+7(1),=X'FF'
:
: Please Look into it ASAP the answer for this will be greately appreciated
: Waiting for your reply
: Regards
: Vijay
The last (rightmost) nibble of the contents
of TDATUM is most likely a hexidecimal "C"
(signifying a plus sign), and this code is
attempting to prepare the date contents
for printing, or viewing, and needs it to be
in standard EDCDIC, so the "C" has to changed
to "F". After unpacking, the "C" was switched
with whatever digit came before it (the final
numeric digit in the TDATUM field), and the
MVZ instruction changes the "C" to "F".
The MVZ only moves the leftmost nibble,
which is a "C" after unpacking. I have seen
this accomplished most often with the
OI MAEN+7,x'F0' instruction (which avoids
a double reference to memory), but the
MVZ used here accomplishes the same thing.
Jerry Burnett [email protected]
: Hello HI
: I have a MVS Assembly code which is to be Impact Analysis for year 2000
: From this code i can only understand that the TDATUM variable which consists a
: date is been unpacked and then formatted in DD.MM.YY in variable MAEN
: I am not able to understand the last instruction MVZ What it is doing what will
: the value in variable MAEN after this operation.
: UNPK DATE,TDATUM
: MVC MAEN(2),DATE
: MVI MAEN+2,C'.'
: MVC MAEN+3(2),DATE+2
: MVI MAEN+5,C'.'
: MVC MAEN+6(2),DATE+4
: MVZ MAEN+7(1),=X'FF'
:
: Please Look into it ASAP the answer for this will be greately appreciated
: Waiting for your reply
: Regards
: Vijay
: I have a MVS Assembly code which is to be Impact Analysis for year 2000
: From this code i can only understand that the TDATUM variable which consists a
: date is been unpacked and then formatted in DD.MM.YY in variable MAEN
: I am not able to understand the last instruction MVZ What it is doing what will
: the value in variable MAEN after this operation.
: UNPK DATE,TDATUM
: MVC MAEN(2),DATE
: MVI MAEN+2,C'.'
: MVC MAEN+3(2),DATE+2
: MVI MAEN+5,C'.'
: MVC MAEN+6(2),DATE+4
: MVZ MAEN+7(1),=X'FF'
:
: Please Look into it ASAP the answer for this will be greately appreciated
: Waiting for your reply
: Regards
: Vijay