Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Assembler Instruction to Display data in Spool
Goto page Previous  1, 2
 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> PL/I & Assembler
View previous topic :: :: View next topic  
Author Message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2469
Location: Netherlands, Amstelveen

PostPosted: Tue May 17, 2011 3:53 pm    Post subject: Re: Assembler Instruction to Display data in Spool
Reply with quote

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
View user's profile Send private message

nigelosberry

New User


Joined: 06 Jan 2009
Posts: 88
Location: Ggn, IN

PostPosted: Tue May 17, 2011 3:54 pm    Post subject: Re: Assembler Instruction to Display data in Spool
Reply with quote

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
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2504
Location: Atlanta, Georgia, USA

PostPosted: Tue May 17, 2011 4:00 pm    Post subject: Reply to: Assembler Instruction to Display data in Spool
Reply with quote

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. icon_wink.gif

When all is said and done, the readable register value can be found in WORKAREA(8).

Bill
Back to top
View user's profile Send private message
UmeySan

Active Member


Joined: 22 Aug 2006
Posts: 771
Location: Germany

PostPosted: Tue May 17, 2011 4:04 pm    Post subject:
Reply with quote

@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
View user's profile Send private message
vinayknj

New User


Joined: 26 May 2008
Posts: 50
Location: Bangalore

PostPosted: Tue May 17, 2011 4:06 pm    Post subject: Assembler Instruction to Display data in Spool
Reply with quote

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
View user's profile Send private message
UmeySan

Active Member


Joined: 22 Aug 2006
Posts: 771
Location: Germany

PostPosted: Tue May 17, 2011 4:10 pm    Post subject:
Reply with quote

@ 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
View user's profile Send private message
nigelosberry

New User


Joined: 06 Jan 2009
Posts: 88
Location: Ggn, IN

PostPosted: Tue May 17, 2011 4:17 pm    Post subject: Re: Assembler Instruction to Display data in Spool
Reply with quote

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
View user's profile Send private message
vinayknj

New User


Joined: 26 May 2008
Posts: 50
Location: Bangalore

PostPosted: Tue May 17, 2011 4:46 pm    Post subject: Assembler Instruction to Display data in Spool
Reply with quote

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
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2469
Location: Netherlands, Amstelveen

PostPosted: Tue May 17, 2011 4:49 pm    Post subject:
Reply with quote

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
View user's profile Send private message
nigelosberry

New User


Joined: 06 Jan 2009
Posts: 88
Location: Ggn, IN

PostPosted: Tue May 17, 2011 4:55 pm    Post subject: Re: Assembler Instruction to Display data in Spool
Reply with quote

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! icon_smile.gif
Back to top
View user's profile Send private message
vinayknj

New User


Joined: 26 May 2008
Posts: 50
Location: Bangalore

PostPosted: Tue May 17, 2011 6:00 pm    Post subject: Assembler Instruction to Display data in Spool
Reply with quote

Thanks Peter and Nihal
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2504
Location: Atlanta, Georgia, USA

PostPosted: Wed May 18, 2011 7:39 am    Post subject: Reply to: Assembler Instruction to Display data in Spool
Reply with quote

Review the following previous post as it may shed some light on your issue -

http://ibmmainframes.com/viewtopic.php?p=258901&highlight=#258901

Bill
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> PL/I & Assembler All times are GMT + 6 Hours
Goto page Previous  1, 2
Page 2 of 2

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Sort records within a data block rajiv rengasamy DFSORT/ICETOOL 0 Fri Jul 12, 2019 3:25 pm
No new posts Regarding mroe data to be processed i... vinu78 DB2 3 Mon May 27, 2019 7:31 pm
No new posts masking data with HPU jzhardy DB2 0 Tue May 14, 2019 2:43 pm
No new posts How to browse RECFM=VBS DSORG=PSE seq... Alan Playford JCL & VSAM 7 Fri May 10, 2019 2:59 pm
No new posts data conversion error maxsubrat PL/I & Assembler 4 Thu May 09, 2019 10:57 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us