> -----Original Message----- > From: IBM Mainframe Discussion List [mailto:ibm-m...@bama.ua.edu] On > Behalf Of Joe Reichman > Sent: Friday, April 16, 2010 11:29 AM > To: IBM-MAIN@bama.ua.edu > Subject: Arithmetic on COBOL usage is pointer > > I redefined a usage pointer to PIC 9(8) comp to do arithmetic and got > weird results. Are there any rules for doing math on Usage is pointer
What kind of "weird" results? I have done this before, but I redefined using PIC S9(09) BINARY rather than 9(8) COMP. Are you using the TRUNC(BIN) compiler option? Check the manual for impact of the TRUNC option for more info. Sometimes it helps to use the LIST compiler option to see exactly what the compiler is generating for your pointer arithmetic statements, sometimes you can determine your problem more easily that way. 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 lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html