ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » Mainframe, CICS, TXSeries » MQPUT1 in Assembler

Post new topic  Reply to topic Goto page Previous  1, 2
 MQPUT1 in Assembler « View previous topic :: View next topic » 
Author Message
Mr Butcher
PostPosted: Thu Apr 08, 2010 7:11 am    Post subject: Reply with quote

Padawan

Joined: 23 May 2005
Posts: 1716

if you have a look on the resolved MQPUT1 command in the assembler listing :

Code:
         CALL  MQPUT1,                                                 X
               (HCONN,                                                 X
               OBJDESC,                                                X
               MSGDESC,                                                X
               PUTMSGOPTS,                                             X
               BUFFERLENGTH,                                           X
               BUFFER,                                                 X
               COMPCODE,                                               X
               REASON),                                                X
               MF=(E,PARMLIST),VL                                       
         CNOP  0,4                                                     
         B     *+8                               BRANCH AROUND VCON     
IHB0020B DC    V(MQPUT1)                         ENTRY POINT ADDRESS   
         LA    1,PARMLIST                        LOAD PARAMETER REG 1   
         LA    14,HCONN           PICKUP PARAMETER                     
         LA    15,OBJDESC         PICKUP PARAMETER                     
         LA    0,MSGDESC          PICKUP PARAMETER                     
         STM   14,0,0(1)                         STORE INTO PARAM. LIST
         LA    14,PUTMSGOPTS      PICKUP PARAMETER                 
         LA    14,PUTMSGOPTS      PICKUP PARAMETER                      02-IHBOP
         LA    15,BUFFERLENGTH    PICKUP PARAMETER                      02-IHBOP
         LA    0,BUFFER           PICKUP PARAMETER                      02-IHBOP
         STM   14,0,12(1)                        STORE INTO PARAM. LIST 02-IHBOP
         LA    14,COMPCODE        PICKUP PARAMETER                      02-IHBOP
         LA    15,REASON          PICKUP PARAMETER                      02-IHBOP
         STM   14,15,24(1)                       STORE INTO PARAM. LIST 02-IHBOP
         OI    28(1),X'80'                SET LAST WORD BIT ON §G860P40 02-IHBOP
         L     15,IHB0020B                       LOAD 15 WITH ENTRY ADR 01-CALL
         BALR  14,15                             BRANCH TO ENTRY POINT  01-CALL
*                                             


then you can see that the "BUFFER" address is picked up by an LA instruction.

So, instead of passing "BUFFER" to the MQPUT1 call, you could also pass the address of the buffer you got returned by the getmain in a register,

e.g. like this

Code:

        L R0,=A(1000)
        GETMAIN R,LV=(0)
        ST R1,SAVEMYBUFFERADDRESS
        ...
        ...
        L   R4,SAVEMYBUFFERADDRESS
        CALL  MQPUT1,                                                  X
               (HCONN,                                                 X
               OBJDESC,                                                X
               MSGDESC,                                                X
               PUTMSGOPTS,                                             X
               BUFFERLENGTH,                                           X
               0(,R4),                                                 X
               COMPCODE,                                               X
               REASON),                                                X
               MF=(E,PARMLIST),VL



that should work........ however, i prefer the "BUFFER" - method
_________________
Regards, Butcher
Back to top
View user's profile Send private message
RNStanich
PostPosted: Wed Apr 14, 2010 6:14 am    Post subject: Reply with quote

Acolyte

Joined: 23 Apr 2002
Posts: 64

Thank you Mr. Butcher that did indeed work (well almost).

We actually just code that keyword as (R4).
I heard the 0(,R4) did not assemble properly - perhaps should have been 0(0,R4) BUT IN ANY CASE - many thanks....
_________________
Regards, Bob
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Goto page Previous  1, 2 Page 2 of 2

MQSeries.net Forum Index » Mainframe, CICS, TXSeries » MQPUT1 in Assembler
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.