On Wed, 1 Aug 2007 09:01:11 -0500 "Kelman, Tom"
<[EMAIL PROTECTED]> wrote:
:>Actually if you have gotten blanks into N2 which is defined as a packed
:>field and then try to move that to N4 which is a display field won't you
:>end up with and abend when it tries to unpack a field which isn't really
:>in packed format?
First of all, it will need to generate an ED, not an UNPK. ED will only S0C7
is there is a sign value in a digit position (top half of the nibble).
Yes, it is possible that if the compiler is brain dead it will ZAP N2 into a
temp field before doing the ED, but that should not be necessary as N2 and N4
have the same number of digits.
Code should be.
MVC tempfld,=X'402020206B2020206b202120'
ED tempfld,N2
MVC N4,tempfld+1(11)
:>-----Original Message-----
:>From: IBM Mainframe Discussion List [mailto:[EMAIL PROTECTED] On
:>Behalf Of Binyamin Dissen
:>Sent: Wednesday, August 01, 2007 8:32 AM
:>To: [email protected]
:>Subject: Re: COBOL Group moves
:>On Wed, 1 Aug 2007 16:45:30 +0530 Rashmi Nijaguni Mogali
:><[EMAIL PROTECTED]> wrote:
:>:>I have a query regarding the following group move:
:>:>01 GRP1.
:>:> 05 N1 PIC S9(9) COMP-3 VALUE +0.
:>:> 05 N2 PIC S9(9) COMP-3 VALUE +0.
:>:>01 GRP2.
:>:> 05 N3 PIC S9(9) COMP-3 VALUE +123.
:>:>01 N4 PIC ZZZ,ZZZ,ZZ9.
:>:>PROCEDURE DIVISION.
:>:> INITIALIZE GRP1.
:>:> MOVE GRP2 TO GRP1.
:>All group moves are character.
:>:> MOVE N2 TO N4.
:>:> DISPLAY N4.
:>:>What value is displayed and why?
:>404,040,404 (unless the compiler generates real nutty code).
:>What do I win?
--
Binyamin Dissen <[EMAIL PROTECTED]>
http://www.dissensoftware.com
Director, Dissen Software, Bar & Grill - Israel
Should you use the mailblocks package and expect a response from me,
you should preauthorize the dissensoftware.com domain.
I very rarely bother responding to challenge/response systems,
especially those from irresponsible companies.
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html