* code an Assembler program named PGMA that checks
  the data (if you're on z, then a simple TP instruction
  should do it)

TP checks for valid signed-packed-decimal data.  The OP's input
data was in character form.  TRT would be more appropriate.

From: Steve Comstock <[EMAIL PROTECTED]>
Reply-To: IBM Mainframe Discussion List <[email protected]>
To: [email protected]
Subject: Re: COBOL move statement issue
Date: Tue, 16 Oct 2007 08:43:42 -0600

Peter Ten Eyck wrote:
I have had some programmers come to me with this issue. It appears that we have a new system (web app.) which is sending bad data in several locations to our mainframe (COBOL programs). The proper thing to do is to correct the web app. so that it send the data correct. While we wait for that fix to occur, I am looking into if there is a way without changing the COBOL code to catch this bad data by forcing an abend.

Well, you could take this approach:

* rename your COBOL program; say from PGMA to PGMA2

* code an Assembler program named PGMA that checks
  the data (if you're on z, then a simple TP instruction
  should do it) and then passes the data to PGMA2 if
  the data are good, but writes a message to an error
  log if the data are bad

(I was going to say fix the data, but that's too
 ambiguous, maybe even dangerous).


Kind regards,

-Steve Comstock

_________________________________________________________________
Make every IM count. Download Messenger and join the i’m Initiative now. It’s free. http://im.live.com/messenger/im/home/?source=TAGHM

----------------------------------------------------------------------
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

Reply via email to