Re: COBOL Group moves
I vote Rashmi compiles his code, runs it, and learns from his experience. On Fri, 3 Aug 2007 13:17:03 -0400, Kirk Talman [EMAIL PROTECTED] wrote: I vote for abend S0C7 on MOVE N2 TO N4. IBM Mainframe Discussion List IBM-MAIN@BAMA.UA.EDU wrote on 08/01/2007 07:15:30 AM: Hi, 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. MOVE N2 TO N4. DISPLAY N4. What value is displayed and why? Regards, Rashmi - The information contained in this communication (including any attachments hereto) is confidential and is intended solely for the personal and confidential use of the individual or entity to whom it is addressed. The information may also constitute a legally privileged confidential communication. If the reader of this message is not the intended recipient or an agent responsible for delivering it to the intended recipient, you are hereby notified that you have received this communication in error and that any review, dissemination, copying, or unauthorized use of this information, or the taking of any action in reliance on the contents of this information is strictly prohibited. If you have received this communication in error, please notify us immediately by e-mail, and delete the original message. Thank you -- 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 -- 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
Fw: COBOL Group moves
Farley, Peter x23353 [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED]... -Original Message- snip Tables are another reason to use INITIALIZE, I don't believe VALUE on table elements works. snip One can use a VALUE clause on an element of a table (and have since the '85 Standard). See: http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/IGY3LR31/5.3.18.1 (2nd paragraph) In the '02 Standard (not implemented by IBM) one can actually use the VALUE clause to initialize specific instances of elements to different values. FYI, The '02 Standard (again, not IBM) also provides a way to use the INITIALIZE statement to set Filler or non-filler fields to the data in the original VALUE clause. -- 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
Re: COBOL Group moves
I vote for abend S0C7 on MOVE N2 TO N4. IBM Mainframe Discussion List IBM-MAIN@BAMA.UA.EDU wrote on 08/01/2007 07:15:30 AM: Hi, 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. MOVE N2 TO N4. DISPLAY N4. What value is displayed and why? Regards, Rashmi - The information contained in this communication (including any attachments hereto) is confidential and is intended solely for the personal and confidential use of the individual or entity to whom it is addressed. The information may also constitute a legally privileged confidential communication. If the reader of this message is not the intended recipient or an agent responsible for delivering it to the intended recipient, you are hereby notified that you have received this communication in error and that any review, dissemination, copying, or unauthorized use of this information, or the taking of any action in reliance on the contents of this information is strictly prohibited. If you have received this communication in error, please notify us immediately by e-mail, and delete the original message. Thank you -- 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
Re: COBOL Group moves
-Original Message- From: Bill Klein [mailto:[EMAIL PROTECTED] Sent: Friday, August 03, 2007 6:54 AM To: IBM-MAIN@BAMA.UA.EDU Subject: Fw: COBOL Group moves Farley, Peter x23353 [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED]... -Original Message- snip Tables are another reason to use INITIALIZE, I don't believe VALUE on table elements works. snip One can use a VALUE clause on an element of a table (and have since the '85 Standard). Thanks Bill. I apologize for being too busy to look it up and basing my reply on *old* knowledge. Peter This message and any attachments are intended only for the use of the addressee and may contain information that is privileged and confidential. If the reader of the message is not the intended recipient or an authorized representative of the intended recipient, you are hereby notified that any dissemination of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately by e-mail and delete the message and any attachments from your system. -- 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
Re: COBOL Group moves
No, programs start with each field initialized properly according to their value clauses. However if you want to reset every item in a group in the middle of a running program, then you would. The INITIALIZE statement comes in use then. Darren -Original Message- From: IBM Mainframe Discussion List [mailto:[EMAIL PROTECTED] On Behalf Of Lizette Koehler Sent: Thursday, August 02, 2007 9:41 AM To: IBM-MAIN@BAMA.UA.EDU Subject: Re: COBOL Group moves I have one question on the following code snippet. If you code a VALUE on an 05 level, do you still have to INITIALIZE the group level? My cobol is very rusty. Lizette -- 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
Re: COBOL Group moves
-Original Message- From: Lizette Koehler [mailto:[EMAIL PROTECTED] Sent: Thursday, August 02, 2007 12:41 PM To: IBM-MAIN@BAMA.UA.EDU Subject: Re: COBOL Group moves I have one question on the following code snippet. If you code a VALUE on an 05 level, do you still have to INITIALIZE the group level? My cobol is very rusty. If ALL the 05 levels (or lower levels as needed) have VALUE clauses, then the answer is no, you do not need to INITIALIZE. OTOH, if the structure needs to be initialized between records or accounts or clients, you may well be using INITIALIZE anyway. Depends on the application, YMMV. Tables are another reason to use INITIALIZE, I don't believe VALUE on table elements works. HTH Peter This message and any attachments are intended only for the use of the addressee and may contain information that is privileged and confidential. If the reader of the message is not the intended recipient or an authorized representative of the intended recipient, you are hereby notified that any dissemination of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately by e-mail and delete the message and any attachments from your system. -- 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
Re: COBOL Group moves
Looks like an old homework question or job interview question. -Original Message- From: IBM Mainframe Discussion List [mailto:[EMAIL PROTECTED] On Behalf Of Lizette Koehler Sent: Wednesday, August 01, 2007 6:53 AM To: IBM-MAIN@BAMA.UA.EDU Subject: Re: COBOL Group moves Steve, I am thinking that this might be better put to the Cobol language group on Google? There he could get the kind of details on COBOL that he might actually be asking about. Lizette 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. MOVE N2 TO N4. DISPLAY N4. What value is displayed and why? Regards, Rashmi Seems a bit off topic for ibm-main, and you could just run an experiment. But I'll have a go. You really only have one group move here: move grp2 to grp1. A group move is a character move, so the five bytes of N3 are placed over the five bytes of N1 and the rest of grp1 (that turns out to be all of n2) is padded with blanks. The result of moving blanks, then, to an edited numeric field depends somewhat on various compiler settings. I really don't have the time to test out all the possibilities right now. I would rather, at this point, throw the question back: what are you trying to accomplish? Why do you ask? Steve Comstock -- 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 -- 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
Re: COBOL Group moves
I have one question on the following code snippet. If you code a VALUE on an 05 level, do you still have to INITIALIZE the group level? My cobol is very rusty. Lizette 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. MOVE N2 TO N4. DISPLAY N4. What value is displayed and why? Regards, Rashmi Seems a bit off topic for ibm-main, and you could just run an experiment. But I'll have a go. You really only have one group move here: move grp2 to grp1. A group move is a character move, so the five bytes of N3 are placed over the five bytes of N1 and the rest of grp1 (that turns out to be all of n2) is padded with blanks. The result of moving blanks, then, to an edited numeric field depends somewhat on various compiler settings. I really don't have the time to test out all the possibilities right now. I would rather, at this point, throw the question back: what are you trying to accomplish? Why do you ask? Steve Comstock -- 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 -- 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 -- 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
COBOL Group moves
Hi, 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. MOVE N2 TO N4. DISPLAY N4. What value is displayed and why? Regards, Rashmi CAUTION - Disclaimer * This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely for the use of the addressee(s). If you are not the intended recipient, please notify the sender by e-mail and delete the original message. Further, you are not to copy, disclose, or distribute this e-mail or its contents to any other person and any such actions are unlawful. This e-mail may contain viruses. Infosys has taken every reasonable precaution to minimize this risk, but is not liable for any damage you may sustain as a result of any virus in this e-mail. You should carry out your own virus checks before opening the e-mail or attachment. Infosys reserves the right to monitor and review the content of all messages sent to or from this e-mail address. Messages sent to or from this e-mail address may be stored on the Infosys e-mail system. ***INFOSYS End of Disclaimer INFOSYS*** -- 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
Re: COBOL Group moves
Steve, I am thinking that this might be better put to the Cobol language group on Google? There he could get the kind of details on COBOL that he might actually be asking about. Lizette 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. MOVE N2 TO N4. DISPLAY N4. What value is displayed and why? Regards, Rashmi Seems a bit off topic for ibm-main, and you could just run an experiment. But I'll have a go. You really only have one group move here: move grp2 to grp1. A group move is a character move, so the five bytes of N3 are placed over the five bytes of N1 and the rest of grp1 (that turns out to be all of n2) is padded with blanks. The result of moving blanks, then, to an edited numeric field depends somewhat on various compiler settings. I really don't have the time to test out all the possibilities right now. I would rather, at this point, throw the question back: what are you trying to accomplish? Why do you ask? Steve Comstock -- 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
Re: COBOL Group moves
Rashmi Nijaguni Mogali wrote: Hi, 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. MOVE N2 TO N4. DISPLAY N4. What value is displayed and why? Regards, Rashmi Seems a bit off topic for ibm-main, and you could just run an experiment. But I'll have a go. You really only have one group move here: move grp2 to grp1. A group move is a character move, so the five bytes of N3 are placed over the five bytes of N1 and the rest of grp1 (that turns out to be all of n2) is padded with blanks. The result of moving blanks, then, to an edited numeric field depends somewhat on various compiler settings. I really don't have the time to test out all the possibilities right now. I would rather, at this point, throw the question back: what are you trying to accomplish? Why do you ask? -- Kind regards, -Steve Comstock The Trainer's Friend, Inc. 303-393-8716 http://www.trainersfriend.com z/OS Application development made easier * Our classes include + How things work + Programming examples with realistic applications + Starter / skeleton code + Complete working programs + Useful utilities and subroutines + Tips and techniques -- 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
Re: COBOL Group moves
I am thinking that this might be better put to the Cobol language group on Google? I'm always suspicious when somebody from a service provider asks a basic question on IBM-Main. The OP is from INFO-SYS, which among other services, provides companies with COBOL programming. - Too busy driving to stop for gas! -- 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
Re: COBOL Group moves
Ted MacNEIL wrote: I am thinking that this might be better put to the Cobol language group on Google? I'm always suspicious when somebody from a service provider asks a basic question on IBM-Main. The OP is from INFO-SYS, which among other services, provides companies with COBOL programming. Maybe he' from another department. It happens. -- Radoslaw Skorupka Lodz, Poland -- BRE Bank SA ul. Senatorska 18 00-950 Warszawa www.brebank.pl Sąd Rejonowy dla m. st. Warszawy XII Wydział Gospodarczy Krajowego Rejestru Sądowego, nr rejestru przedsiębiorców KRS 025237 NIP: 526-021-50-88 Według stanu na dzień 01.01.2007 r. kapitał zakładowy BRE Banku SA (w całości opłacony) wynosi 118.064.140 zł. W związku z realizacją warunkowego podwyższenia kapitału zakładowego, na podstawie uchwał XVI WZ z dnia 21.05.2003 r., kapitał zakładowy BRE Banku SA może ulec podwyższeniu do kwoty 118.760.528 zł. Akcje w podwyższonym kapitale zakładowym będą w całości opłacone. -- 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
Re: COBOL Group moves
And your point is... -Original Message- From: IBM Mainframe Discussion List [mailto:[EMAIL PROTECTED] On Behalf Of Ted MacNEIL Sent: Wednesday, August 01, 2007 5:20 AM To: IBM-MAIN@BAMA.UA.EDU Subject: Re: [IBM-MAIN] COBOL Group moves I am thinking that this might be better put to the Cobol language group on Google? I'm always suspicious when somebody from a service provider asks a basic question on IBM-Main. The OP is from INFO-SYS, which among other services, provides companies with COBOL programming. - Too busy driving to stop for gas! -- 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 -- 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
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
Re: COBOL Group moves
-Original Message- From: IBM Mainframe Discussion List On Behalf Of Kelman, Tom 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? It's not the UNPK instruction that suffers the S0C7, but any packed-decimal instruction (except ZAP with a packed-decimal source field). UNPK just expands each nybble but the rightmost byte into a byte, and inserts a sign nybble of x'F'; and just reverses the order of the nybbles in the rigntmost byte of the field being unpacked. It can suffer a S0C4 and perhaps other interruptions, but not a S0C7. -jc- -- 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
Re: COBOL Group moves
Taking a ride on the way-back machine (cartoon reference) There was a cobol compiler option that would print the generated assembler code. I'd just turn that on to SEE what was happening. But then I've also zapped patches into cobol object code before also -- 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
Re: COBOL Group moves
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? Tom Kelman Commerce Bank of Kansas City (816) 760-7632 -Original Message- From: IBM Mainframe Discussion List [mailto:[EMAIL PROTECTED] On Behalf Of Binyamin Dissen Sent: Wednesday, August 01, 2007 8:32 AM To: IBM-MAIN@BAMA.UA.EDU 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 * If you wish to communicate securely with Commerce Bank and its affiliates, you must log into your account under Online Services at http://www.commercebank.com or use the Commerce Bank Secure Email Message Center at https://securemail.commercebank.com NOTICE: This electronic mail message and any attached files are confidential. The information is exclusively for the use of the individual or entity intended as the recipient. If you are not the intended recipient, any use, copying, printing, reviewing, retention, disclosure, distribution or forwarding of the message or any attached file is not authorized and is strictly prohibited. If you have received this electronic mail message in error, please advise the sender by reply electronic mail immediately and permanently delete the original transmission, any attachments and any copies of this message from your computer system. * -- 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
Re: COBOL Group moves
Hey Sherman (completing the reference), If my memory serves me correctly, and lately I'm not sure, the option to which you refer is PMAP. Chuck -Original Message- From: IBM Mainframe Discussion List [mailto:[EMAIL PROTECTED] On Behalf Of Rugen, Len Sent: Wednesday, August 01, 2007 9:29 AM To: IBM-MAIN@BAMA.UA.EDU Subject: Re: COBOL Group moves Taking a ride on the way-back machine (cartoon reference) There was a cobol compiler option that would print the generated assembler code. I'd just turn that on to SEE what was happening. But then I've also zapped patches into cobol object code before also -- 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
Re: COBOL Group moves
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: IBM-MAIN@BAMA.UA.EDU :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
Re: COBOL Group moves
-Original Message- From: IBM Mainframe Discussion List [mailto:[EMAIL PROTECTED] On Behalf Of Hardee, Charles H Sent: Wednesday, August 01, 2007 9:44 AM To: IBM-MAIN@BAMA.UA.EDU Subject: Re: COBOL Group moves Hey Sherman (completing the reference), If my memory serves me correctly, and lately I'm not sure, the option to which you refer is PMAP. Chuck LIST for the newer COBOL compilers. PMAP was for OS/VS COBOL. -- John McKown Senior Systems Programmer HealthMarkets Keeping the Promise of Affordable Coverage Administrative Services Group Information Technology The information contained in this e-mail message may be privileged and/or confidential. It is for intended addressee(s) only. If you are not the intended recipient, you are hereby notified that any disclosure, reproduction, distribution or other use of this communication is strictly prohibited and could, in certain circumstances, be a criminal offense. If you have received this e-mail in error, please notify the sender by reply and delete this message without copying or disclosing it. -- 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
Re: COBOL Group moves
On 8/1/07, Hardee, Charles H [EMAIL PROTECTED] wrote: Hey Sherman (completing the reference), If my memory serves me correctly, and lately I'm not sure, the option to which you refer is PMAP. Chuck That was way back. The option is now LIST. Jim McAlpine -- 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
Re: COBOL Group moves
Rashmi, As the other person said, GRP2 of five bytes would overlay the first five byte of GRP1, the rest of GRP1 is filled with spaces. Unless you are using some unsafe compiler options, then the statement MOVE N2 TO N4 should abend with an S0C7 (Data Decimal Exception) as N2 is not a valid number. However you could do the move using reference modification like this MOVE GRP2 TO GRP1(1:LENGTH OF GRP2). In which case N2 would remain a 0 when the display statement is reached. Darren -Original Message- From: IBM Mainframe Discussion List [mailto:[EMAIL PROTECTED] On Behalf Of Rashmi Nijaguni Mogali Sent: Wednesday, August 01, 2007 4:16 AM To: IBM-MAIN@BAMA.UA.EDU Subject: COBOL Group moves Hi, 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. MOVE N2 TO N4. DISPLAY N4. What value is displayed and why? Regards, Rashmi -- 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
Re: COBOL Group moves
snip It could be worse. We had a guy on here last week asking how to convert a string of hex characters into a binary number. He was given the *two* instructions that he needed. He then had to get back to us to find out how to extend his program's addressability beyond 4KiB. We also had to tell him which manual to look in to find the answers. He then posted this masterpiece on his *copyrighted* hints and tips website. :-) /snip J, I remember seeing that thread, who was this sarcasm assembler wizard /sarcasm and where are these *copyrighted* hints and tips. Thanks, Fletch -- 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
Re: COBOL Group moves
I'm always suspicious when somebody from a service provider asks a basic question on IBM-Main. It could be worse. We had a guy on here last week asking how to convert a string of hex characters into a binary number. He was given the *two* instructions that he needed. He then had to get back to us to find out how to extend his program's addressability beyond 4KiB. We also had to tell him which manual to look in to find the answers. He then posted this masterpiece on his *copyrighted* hints and tips website. :-) Date: Wed, 1 Aug 2007 12:19:50 + From: [EMAIL PROTECTED] Subject: Re: COBOL Group moves To: IBM-MAIN@BAMA.UA.EDU I am thinking that this might be better put to the Cobol language group on Google? I'm always suspicious when somebody from a service provider asks a basic question on IBM-Main. The OP is from INFO-SYS, which among other services, provides companies with COBOL programming. - Too busy driving to stop for gas! _ Missed the show? Watch videos of the Live Earth Concert on MSN. http://liveearth.msn.com -- 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