IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How to display Register values using WTO


IBM Mainframe Forums -> PL/I & Assembler
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
sudarshan.srivathsav

New User


Joined: 10 Jul 2012
Posts: 24
Location: USA

PostPosted: Fri May 02, 2014 11:46 pm
Reply with quote

Hi Guys,

I need a urgent help, I want to display the register values in JESMSGLG using WTO. I tried a couple of ways it does not work. Can you please share a code snippet to do this??

Scenario, I am using a Java code call JNI (Code) , and the C calls the ASM which linked with it as a DLL. Now the address information is passed from Java to C properly , I also displayed the address just before the call to ASM, it is good, but when it hits my ASM module, it fails in the first load instruction. Note that this is running under the ZLINUX jvm, so I cannot do SOC1 to see them. I dont trust what JVM is showing.


All i want to do is to display the content of the register using a WTO.. Need it urgently!! icon_rolleyes.gif
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Sat May 03, 2014 12:07 am
Reply with quote

You should remember that providing help on a forum is
on voluntary basis and on our own time.

no commitment to reply, no expectation to receive an answer.

if You have time constraints a forum is not the best place to ask for help.

claiming urgency will most of the time chase away people who could help,
making Your chances of getting help pretty slim.
Back to top
View user's profile Send private message
steve-myers

Active Member


Joined: 30 Nov 2013
Posts: 917
Location: The Universe

PostPosted: Sat May 03, 2014 1:11 am
Reply with quote

The mechanics are not too terribly difficult, but
  • What is the AMODE?
  • What about the remainder of the environment? Does register 13 point to a register save area? Can I do a GETMAIN to obtain storage?
Code:
SHOWREG1 RSECT                     Define program CSECT
SHOWREG1 AMODE ANY                 Define program AMODE
SHOWREG1 RMODE ANY                 Define program RMODE
         USING *,3                 Establish program addressability
         USING WA,4                Establish work area addressability
         SAVE  (14,4),,*           Save registers
         LR    2,1                 Copy register 1 to register 2
         LR    3,15                Establish program base register
         LA    0,WASIZE            Load length of the work area
         GETMAIN RU,LV=(0)         Allocate storage for the work area
         LR    4,1                 Copy work area address to reg 4
         ST    2,REG1              Save original reg 1
         MVC   WTOBUF,MASTWTO      Copy message base to the work area
         IC    0,RESULT+L'RESULT   Load byte following the result
         UNPK  RESULT(9),REG1(5)   Convert reg 1 to
         NC    RESULT,=8X'0F'       hexadecimal
         TR    RESULT,HEXTAB         digits
         STC   0,RESULT+L'RESULT   Restore data damaged by the UNPK
         WTO   MF=(E,WTOBUF)       Write the message
         LA    0,WASIZE            Load length of the work area
         FREEMAIN RU,LV=(0),A=(4)  Free the work area
         RETURN (14,4),T,RC=0      Restore registers & return
MASTWTO  WTO   'R1 = XXXXXXXX',MF=L,ROUTCDE=11,DESC=7
MASTWTOL EQU   *-MASTWTO
         DC    0D'0'
HEXTAB   DC    C'0123456789ABCDEF'
         LTORG ,
         DC    0D'0'
WA       DSECT
REG1     DS    F
WTOBUF   DS    XL(MASTWTOL)
         ORG   WTOBUF+4
         DS    C'R1 = '
RESULT   DS    CL8' '
         ORG   ,
         DS    0D
WASIZE   EQU   *-WA
         END   SHOWREG1
Back to top
View user's profile Send private message
steve-myers

Active Member


Joined: 30 Nov 2013
Posts: 917
Location: The Universe

PostPosted: Tue May 06, 2014 5:24 pm
Reply with quote

sudarshan.srivathsav wrote:
Hi Guys,

I need a urgent help, I want to display the register values in JESMSGLG using WTO. I tried a couple of ways it does not work. Can you please share a code snippet to do this??

Scenario, I am using a Java code call JNI (Code) , and the C calls the ASM which linked with it as a DLL. Now the address information is passed from Java to C properly , I also displayed the address just before the call to ASM, it is good, but when it hits my ASM module, it fails in the first load instruction. Note that this is running under the ZLINUX jvm, so I cannot do SOC1 to see them. I dont trust what JVM is showing.


All i want to do is to display the content of the register using a WTO.. Need it urgently!! icon_rolleyes.gif
Sorry, I didn't think about this when I prepared my example.
  1. The intent of an OS/360 style WTO is to send a message to the operator's console. Is there anything like this in z/Linux?
  2. z/Linux is Ascii. My little program assumed EBCDIC.
I don't think there is much z/Linux expertise here. Good luck.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> PL/I & Assembler

 


Similar Topics
Topic Forum Replies
No new posts INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts Null values are considered in Total c... DFSORT/ICETOOL 6
No new posts Converting ASCII values to COMP-3 (ZD... JCL & VSAM 2
No new posts Generate output lines (SYSIN card for... DFSORT/ICETOOL 4
Search our Forums:

Back to Top