Pack of FOW123 followed by zap and unpack would do this without a data exception. Only changes the zones C,D,E. Probably pic 999999 ==> pic 999999. Why not use If not numeric?
-----Original Message----- From: IBM Mainframe Discussion List [mailto:[EMAIL PROTECTED] On Behalf Of McKown, John Sent: Tuesday, August 26, 2008 8:40 AM To: IBM-MAIN@BAMA.UA.EDU Subject: Re: Enterprise COBOL v3.4.1 run time issue > -----Original Message----- > From: IBM Mainframe Discussion List > [mailto:[EMAIL PROTECTED] On Behalf Of Paul Gilmartin > Sent: Monday, August 25, 2008 9:45 AM > To: IBM-MAIN@BAMA.UA.EDU > Subject: Re: Enterprise COBOL v3.4.1 run time issue > > On Mon, 25 Aug 2008 08:26:19 -0600, Steve Comstock wrote: > > >K Zafirop wrote: > >> > >The value > >> passed is the arithmetic truncation of the string. For example a > >> string 'FOW123' is passed with value '666123'. > > > >I'm confused here. How can the string 'FOW123' have a value '666123'? > >The string is its value. > > > It appears as if something is doing a Pack and ignoring data errors. > > -- gil There is no "data error" possible with a PACK instruction. The programmer must validate that his input is valid before doing a PACK. Now, it is possible that the PACK instruction will create output which is not a valid packed decimal number. But that will not be detected until another decimal instruction tries to use it (such as ZAP, or AP, or SP, or ...). -- 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 ------------------------------------------------------------------------------ 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. 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