View previous topic :: View next topic
|
Author |
Message |
mallireddy06
New User
Joined: 05 Feb 2007 Posts: 10 Location: india
|
|
|
|
Hi Friends,
i am facing ASRA abend for the following code,can any body try to help me.
XMEC-CUM-PREM-PREV1 PIC S9(9)V99 COMP-3.
MEC-PREV-CUM-PREM1-SO PIC Z(8)9.99-.
MEC-PREV-CUM-PREM1-SI PIC X(13).
MOVE XMEC-CUM-PREM-PREV1 to MEC-PREV-CUM-PREM1-SO.
Thanks
mallireddy |
|
Back to top |
|
|
chandracdac
New User
Joined: 15 Jun 2007 Posts: 92 Location: bangalore
|
|
|
|
when ever we r trying to move the data into noncompatable field at that time we will get asra abend, i think in u r code what u did is u r trying to move comp-3 value to some other i think its not possible so whats my suggession is declare one variable in w-s-s first move that one to that variable and then from variable to u r required field ,i think it works if not am sorry
thanks |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
Quote: |
ASRA
Explanation: The task has terminated abnormally because of a program check.
System Action: The task is abnormally terminated and CICS issues either message DFHAP0001 or DFHSR0001. Message DFHSR0622 may also be issued.
User Response: Refer to the description of the associated message or messages to determine and correct the cause of the program check.
|
Next time use this link for IBM's LookAt , or download the ABEND Tool from this site. You have not provided enough info for us to start guessing why you received an ASRA.
Actually,since this is an easy problem, you would benefit from the research and debugging necessary to resolve the problem and I therefore refuse to provide the answer to your question. Rather, I will provide the links for info, so that you can work out the solution yourself.
A Hint: You've isolated the problem to one instruction with two variables. What is in the variables???????? |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
chandracdac,
of the 13 posts that you have made, about 12 of them have false information, the last post being one of the 12 in error. By the way, this is not a chat room. Had all of your posts been readable you may have had 13.
Are you trying to be flammed! |
|
Back to top |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
chandracdac wrote: |
when ever we r trying to move the data into noncompatable field at that time we will get asra abend, i think in u r code what u did is u r trying to move comp-3 value to some other i think its not possible so whats my suggession is declare one variable in w-s-s first move that one to that variable and then from variable to u r required field ,i think it works if not am sorry
thanks |
I'm not sure just what you are trying to say, but the two fields involved are not "noncompatable"........ |
|
Back to top |
|
|
mallireddy06
New User
Joined: 05 Feb 2007 Posts: 10 Location: india
|
|
|
|
i tried the code like this now it is working, but i want to know the reason
behind this.can any body help me who knows it.
01 XMEC-CUM-PREM-PREV1-NEW PIC 9(13) VALUE ZEROES.
MOVE XMEC-CUM-PREM-PREV1 TO XMEC-CUM-PREM-PREV1-NEW.
MOVE XMEC-CUM-PREM-PREV1-NEW TO MEC-PREV-CUM-PREM1-SO. |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
I can only guess that if it works now, the data is now valid....
The best thing you could have done was to look at the original ASRA dump and see just what the data looked like....
Speaking from experience (I'm betting the data comes from a map), the user entered either a comma or more probably a decimal point in the number.
As a programmer, it is your responsibility to clean up and validate the stuff entered by users - NUMVAL is one way, or just testing the input field with an IF NUMERIC... |
|
Back to top |
|
|
chandracdac
New User
Joined: 15 Jun 2007 Posts: 92 Location: bangalore
|
|
|
|
what i explained is working mr dbz. malli told he tried it and is working ,why u r blamming me am not understanding, in my training we did one case study in that also i did same but u r telling that is wrong how am not getting u,may be some times i might gave wrong info that is up to my knowledge not to blame any one
am very sorry if i gave any wrong information pls dnt consider my replies
thanks |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
Well, of the three assembler ops used, edit is the only one that will data exception.....
If the original number was entered like '99.', ie, X'F9F94B',
the pack would have produced X'99B4'.
and the edit would have ASRAed....
With the extra move to the unsigned display,
the unpack would have produced X'F9F9B4'
which COBOL (because it's unsigned) would have changed to X'F9F9F4', ie, '994' which is not the same as '99.'........
The move might be avoiding the ASRA, but is the resulting data correct? |
|
Back to top |
|
|
|