View previous topic :: View next topic
|
Author |
Message |
PeterHolland
Global Moderator
Joined: 27 Oct 2009 Posts: 2481 Location: Netherlands, Amstelveen
|
|
|
|
vinayknj wrote: |
Hi Nihal,
The Job has displayed VINAY in JESMSGLG but the job abended with SOC1.
What might be the reason? |
Once again, you try to execute working storage after your WTO because you dont branch to executable code. If you dont understand that, stop trying to write an assembler program. And your SD23 abends are a result of not providing the length of your text. For the rest read the manual :
MVS Programming: Authorized
Assembler Services Reference, Volume 4
(SETFRR-WTOR) |
|
Back to top |
|
|
nigelosberry
New User
Joined: 06 Jan 2009 Posts: 88 Location: Ggn, IN
|
|
|
|
vinayknj wrote: |
Hi Nihal,
The Job has displayed VINAY in JESMSGLG but the job abended with SOC1.
What might be the reason? |
Vinay,
From the error(S0C1) I guess that: you need to keep the WTO macro statement in the executable part of your program. MSG1 should be kept in the work area of your program(i.e. the part where you keep rest of your variables/fields).
A general rule is :Whenever you write a program control should never reach your work area.
This has already been suggested by a few others in the Forum. |
|
Back to top |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
As has been said, you need to perform making your data readable, such as a register content, R1 for example -
Code: |
DWORD DS D
WORKAREA DS CL16
ST R1,DWORD STORE IN 1ST-WORD
UNPK WORKAREA(9),DWORD(5) UNPACK AS 9-BYTES
XC DWORD,DWORD ENSURE X'00'S
MVZ WORKAREA(8),DWORD CLEAR ALL ZONES
TR WORKAREA(8),=CL16'0123456789ABCDEF'
|
Depending on the location in the program, you could remove the XC and MVZ and change the Translate-Table to =CL16'0123456789ABCDEF'-240, but the above will work for you and would be a different discussion for a different day.
When all is said and done, the readable register value can be found in WORKAREA(8).
Bill |
|
Back to top |
|
|
UmeySan
Active Member
Joined: 22 Aug 2006 Posts: 771 Location: Germany
|
|
|
|
@Peter
Make assurance double sure & Better safe than sorry
...in terms of repeating comments
As you could see in the last posts, it's still the same |
|
Back to top |
|
|
vinayknj
New User
Joined: 26 May 2008 Posts: 50 Location: Bangalore
|
|
|
|
Thanks Nihal/peter. Sorry for troubling u with silly questions.
I understood that we shouldn't execute the data fields and we should branch to the instructions instead.
I included below Branch instruction but still I am getting SOC1 abend.
DISMSG WTO TEXT=MSG1,ROUTCDE=11
B BACK .
MSG1 DC H'05'
DC CL5'VINAY'
FILLER DC 80CL1' '
BACK XR R15,R15
RETURN
END |
|
Back to top |
|
|
UmeySan
Active Member
Joined: 22 Aug 2006 Posts: 771 Location: Germany
|
|
|
|
@ Bill
Very magnificent example. But a long as Mr. vinayknj doesn't accept, that he can't code a a instuction, whatever instruction it will be, directly followed by a constant-declaration, all our strenuous efforts will have no success. |
|
Back to top |
|
|
nigelosberry
New User
Joined: 06 Jan 2009 Posts: 88 Location: Ggn, IN
|
|
|
|
vinayknj wrote: |
Thanks Nihal/peter. Sorry for troubling u with silly questions.
I understood that we shouldn't execute the data fields and we should branch to the instructions instead.
I included below Branch instruction but still I am getting SOC1 abend.
DISMSG WTO TEXT=MSG1,ROUTCDE=11
B BACK .
MSG1 DC H'05'
DC CL5'VINAY'
FILLER DC 80CL1' '
BACK XR R15,R15
RETURN
END |
Vinay,
Its not practical to predict the reason for error without seeing the whole program and the dump in a few cases.
If you are a beginner and are willing to learn assembler(that's what I feel after seeing your code) then you better get a tutorial and have a detailed study of the most basic topics first. You can solve your problems yourself once you have a "minimum working knowledge" of assembler.
You could try searching a few useful links to documents/tutorials in older posts of this forum. |
|
Back to top |
|
|
vinayknj
New User
Joined: 26 May 2008 Posts: 50 Location: Bangalore
|
|
|
|
Thanks Nihal.
I was able to remove the Abend after using RETURN (14,12),RC=0. Thanks a lot for your help. |
|
Back to top |
|
|
PeterHolland
Global Moderator
Joined: 27 Oct 2009 Posts: 2481 Location: Netherlands, Amstelveen
|
|
|
|
Ok, this is my last input, being a skeleton for an assembler program :
Code: |
R0 EQU 0 00010021
R1 EQU 1 00020021
R2 EQU 2 00030021
R3 EQU 3 00040021
R4 EQU 4 00050021
R5 EQU 5 00060021
R6 EQU 6 00070021
R7 EQU 7 00080021
R8 EQU 8 00090021
R9 EQU 9 00100021
R10 EQU 10 00110021
R11 EQU 11 00120021
R12 EQU 12 00130021
R13 EQU 13 00140021
R14 EQU 14 00150021
R15 EQU 15 00160021
* 00170021
MCC85C CSECT 00180021
SAVE (14,12),,MCC85C_&SYSDATE._&SYSTIME 00190021
LR R12,R15 LOAD ENTRY POINT 00200021
USING MCC85C,R12 SET UP ADDRESSABILITY 00210021
LR R14,R13 00220021
LA R13,SAVE85C 00230021
ST R14,4(R13) 00240021
ST R13,8(R14) 00250021
B MCC85C01 00260021
SAVE85C DC 18F'0' 00270021
MCC85C01 EQU * 00280021
*
put here all your code to execute
*
OPENCLOS L 13,SAVE85C+4 00250000
RETURN (14,12),RC=0 00260000
*
define here all your working storage things
*
END MCC85C 00370000
|
|
|
Back to top |
|
|
nigelosberry
New User
Joined: 06 Jan 2009 Posts: 88 Location: Ggn, IN
|
|
|
|
vinayknj wrote: |
Thanks Nihal.
I was able to remove the Abend after using RETURN (14,12),RC=0. Thanks a lot for your help. |
Happy to help! |
|
Back to top |
|
|
vinayknj
New User
Joined: 26 May 2008 Posts: 50 Location: Bangalore
|
|
|
|
Thanks Peter and Nihal |
|
Back to top |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
Back to top |
|
|
|