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 » General IBM MQ Support » MQ-CICS Bridge - Pseudo-Conversion and ADS

Post new topic  Reply to topic
 MQ-CICS Bridge - Pseudo-Conversion and ADS « View previous topic :: View next topic » 
Author Message
bvasanth
PostPosted: Wed May 12, 2004 1:36 am    Post subject: MQ-CICS Bridge - Pseudo-Conversion and ADS Reply with quote

Apprentice

Joined: 03 May 2004
Posts: 27
Location: Chennai, India

I am connecting CICS 3270 transaction from a plain java program. I have successfully sent a CICS 3270 transaction code in MQCIH, and got the front screen Mapset and map name from 3270 transaction. Then I choose one option in the menu, and construct RECEIVE MAP vector and Applicationm Data Structure (ADS). This message is not gettign executed succesfully. I am getting abend in log MBRF in program DFHXMAB term ????. I am not able to debug. Instead of sending data in ADS, I sent another RECEIVE MAP vector with key press PF12 to exit application. This message is getting executed by CICS bridge. Hence it appears that there is some problem in ADS. For a note: My java client is in Win2k, and 3270 transaction is obviously on MVS. I am not sending or receiving any ADSD or ADSDL. Is that a problem?.
(When should I use ADSD/ADSDL? Are they absolutley necessary?)
Thanks,
Vasanth
Back to top
View user's profile Send private message
bob_buxton
PostPosted: Wed May 12, 2004 7:26 am    Post subject: Reply with quote

Master

Joined: 23 Aug 2001
Posts: 266
Location: England

MBRF abend code is issued for unexpected return code from an MQGET.
Possibly it is an error in the message correlid or perhaps the message length was too long, it is not issued for errors in the ADS.

The bridge abend codes are listed in the MQ messages and codes book in chapter 49.

You don't need the ADSD/ADSDL if your application understands the structure of the map data it is sending/receiving. You can request the ADSD/ADSDL be returned if you want to be told the names of the fields, field lengths etc.

You need to use the long form of the ADS (ADSL) MCADSD_MSGFORMAT if you are building message in ASCII and expecting MQ to do ASCII-EBCDIC conversion. You can use the short form if you do your own conversion of data .
_________________
Bob Buxton
Ex-Websphere MQ Development
Back to top
View user's profile Send private message
bvasanth
PostPosted: Wed May 12, 2004 6:51 pm    Post subject: Reply with quote

Apprentice

Joined: 03 May 2004
Posts: 27
Location: Chennai, India

Thanks for reply.
A manual says that If the MQSeries application is on a platform other than MVS, the message must be converted between EBCDIC and the code page of the local platform and BMS maps should be assembled using DSECT=ADSL if your client is on other than MVS. It also mentions that only C copybooks are supported for ADSL, and you have to manually create ADSL for COBOL based on C version. Does that mean I have to code ADSL copybook for COBOL and recompile my CICS programs so that I can send ADS from client to MQ in long format?
Back to top
View user's profile Send private message
bob_buxton
PostPosted: Thu May 13, 2004 12:39 am    Post subject: Reply with quote

Master

Joined: 23 Aug 2001
Posts: 266
Location: England

No changes at all are required to your CICS applications.
The COBOL ADSL comments are only relevant if you were coding your workstation client application in COBOL (some people do). Conversion
between long and short forms of the ADS is done by the bridge.
_________________
Bob Buxton
Ex-Websphere MQ Development
Back to top
View user's profile Send private message
bvasanth
PostPosted: Thu May 13, 2004 1:20 am    Post subject: Reply with quote

Apprentice

Joined: 03 May 2004
Posts: 27
Location: Chennai, India

I used ADSL format in my java client, and CICS transaction is getting executed. But encounter a problem. My map has two fields HEADER (LENGTH:20) and ACCOUNTNUMER (LENGTH:5). CICS reads only the HEADER field data, but does not read ACCOUNTNUMBER. This is my receive map vector with ADSL: CICS transaction is reading any value that I give in HEADER field, but doesn;t read anything from ACCOUNTNUMBER field.
Code:

//Receive Map vector starts here
msg.writeInt(168); //Vector Length - includes ADSL data
msg.writeString("1802"); //Receive Map
msg.writeString("I   "); //I Indicates Inbound
msg.writeString("0000"); //Vector Version
msg.writeString("Y   "); // includes 3 blanks to right
msg.writeString("MLNMP01 "); //MAPSET name
msg.writeString("DETAILS "); //MAP name
msg.writeString(ENTER); //AID KEY - single quote for ENTER
msg.writeInt(593); //cur pos
msg.writeInt(120); //Data length including 12 reserved bytes
//ADSL starts here
msg.writeString("            "); //12 reserved bytes
msg.writeInt(60); //offset to next field
msg.writeInt(0);  //attributes
msg.writeInt(0);
msg.writeInt(0);
msg.writeInt(0);
msg.writeInt(0);
msg.writeInt(0);
msg.writeInt(0);
msg.writeInt(0);
msg.writeInt(0);
msg.writeString("1                   "); //header of length 20-- data is 1
msg.writeInt(48); //offset to next field
msg.writeInt(0); //attributes
msg.writeInt(0);
msg.writeInt(0);
msg.writeInt(0);
msg.writeInt(0);
msg.writeInt(0);
msg.writeInt(0);
msg.writeInt(0);
msg.writeInt(0);
msg.writeString("12345"); //account number of length 5
msg.writeString("   "); //3 empty bytes to align to full word

Can you help to fine error?

Thanks,
Vasanth
Back to top
View user's profile Send private message
bob_buxton
PostPosted: Thu May 13, 2004 2:24 am    Post subject: Reply with quote

Master

Joined: 23 Aug 2001
Posts: 266
Location: England

It appears that you are not setting the input data length (the line labeled attributes) in your code. See the brmq_adsl_input_field mapping in dfhbrmqh.h header file. You could also set the modified data flag but I don't think this is critical.
_________________
Bob Buxton
Ex-Websphere MQ Development
Back to top
View user's profile Send private message
bvasanth
PostPosted: Thu May 13, 2004 4:18 am    Post subject: Reply with quote

Apprentice

Joined: 03 May 2004
Posts: 27
Location: Chennai, India

I have changed data length attribute also (see line marked //data length below) for both fields. still CICS application is not able to read beyond first field i.e HEADER field in this case. I have also tried setting value 1 in modified flag (marked //flag below), still not working.

I had put display statements in my CICS application for map's record, and program displays (in CICS job's CEEMSG) entire data of HEADER field, but next to it some chars (like & <)are present which are not ACCOUNTNMBER DATA.
Here is the modified code with lenght data.
Code:

//Receive Map vector starts here
msg.writeInt(168); //Vector Length - includes ADSL data
msg.writeString("1802"); //Receive Map
msg.writeString("I   "); //I Indicates Inbound
msg.writeString("0000"); //Vector Version
msg.writeString("Y   "); // includes 3 blanks to right
msg.writeString("MLNMP01 "); //MAPSET name
msg.writeString("DETAILS "); //MAP name
msg.writeString(ENTER); //AID KEY - single quote for ENTER
msg.writeInt(593); //cur pos
msg.writeInt(120); //Data length including 12 reserved bytes
//ADSL starts here
msg.writeString("            "); //12 reserved bytes
msg.writeInt(60); //offset to next field
msg.writeInt(20);  //data length
msg.writeInt(0);  //flag
msg.writeInt(0);
msg.writeInt(0);
msg.writeInt(0);
msg.writeInt(0);
msg.writeInt(0);
msg.writeInt(0);
msg.writeInt(0);
msg.writeString("1                   "); //header of length 20-- data is 1
msg.writeInt(48); //offset to next field
msg.writeInt(5); //data length
msg.writeInt(0); //flag
msg.writeInt(0);
msg.writeInt(0);
msg.writeInt(0);
msg.writeInt(0);
msg.writeInt(0);
msg.writeInt(0);
msg.writeInt(0);
msg.writeString("12345"); //account number of length 5
msg.writeString("   "); //3 empty bytes to align to full word

Note: I have set ADSdescriptor in CIH as 256 to indicate long format and MQ format in CIH as CSQCBDCI. Message (in java program) Encoding is MQENC_NATIVE and characterset id is set to 819 (I also tried 1252).

Am I missing any other point?

Thanks
Vasanth
Back to top
View user's profile Send private message
bvasanth
PostPosted: Thu May 13, 2004 8:58 pm    Post subject: Reply with quote

Apprentice

Joined: 03 May 2004
Posts: 27
Location: Chennai, India

Bob Buxton:
After I gave length in length field (marked //data length below), cobol record of map equivalent assumes correct length (value 5 that i passed in client pgm) in ACCOUNTL variable. But other data field ACCOUNTI does not take what I set in my client program. It takes some junk values.

Code:

//Java client code for 2nd field
msg.writeInt(48); //offset to next field
msg.writeInt(5); //data length
msg.writeInt(0); //flag
msg.writeInt(0);
msg.writeInt(0);
msg.writeInt(0);
msg.writeInt(0);
msg.writeInt(0);
msg.writeInt(0);
msg.writeInt(0);
msg.writeString("ABCDE"); //Alpha account number of length 5 msg.writeString("   "); //3 empty bytes to align to full word

//Below is map equivalent COBOL copybook for 2nd field
          02  ACCOUNTL    COMP  PIC  S9(4).         
          02  ACCOUNTF    PICTURE X.               
          02  FILLER REDEFINES ACCOUNTF.           
              03 ACCOUNTA    PICTURE X.               
          02  FILLER   PICTURE X(2).               
          02  ACCOUNTI  PIC X(5).                   

ACCOUNTL gets the value 5 as I set in client program. But ACCOUNTI has some junk hex values x'4142434445' Remember that first field holds correct data.
What could be the problem?
Back to top
View user's profile Send private message
bob_buxton
PostPosted: Fri May 14, 2004 12:17 am    Post subject: Reply with quote

Master

Joined: 23 Aug 2001
Posts: 266
Location: England

4142434445 is not a junk value it is ABCDE in ASCII!

So the problem is that ASCII-EBCDIC conversion hasn't been performed.
What CodedCharSetId values are you putting into the MQMD and MQCIH, headers it should be MQCCSI_INHERIT.

I will also point out at his time that you will need the CONVERT=YES attribute on the sender channel from zOS to your Windows system to ensure that reply messages are converted into ASCII.
_________________
Bob Buxton
Ex-Websphere MQ Development
Back to top
View user's profile Send private message
bvasanth
PostPosted: Fri May 14, 2004 12:40 am    Post subject: Reply with quote

Apprentice

Joined: 03 May 2004
Posts: 27
Location: Chennai, India

1) I had my CCSID in messages as 819, and have changed now to MQCCSI_INHERIT. When I run my program, I got MQException: IOException: java.io.UnsupportedEncodingException: -Cp-2.
Encoding set in my message is MQENC_NATIVE.
Should I change to something else?

2) For CONVERT=YES: My java client directly puts the messages into application queue on OS/390. I do not have any MQ set up in my win2k system. So I am not using any sender channel, so I can't set CONVERT=YES. Should I go for double MQ server set up: one on win2k and another on OS/390 and establish channel between them?

3) How come the data in first field (in ADSL) alone is getting converted correctly and used by CICS application?
Back to top
View user's profile Send private message
DonBrady
PostPosted: Sun Jun 06, 2004 6:13 am    Post subject: Reply with quote

Newbie

Joined: 06 Jun 2004
Posts: 1

Thanks for the comments in this thread - they are very helpful.

Like Vasanth, I also am interested in calling a CICS 3270 transaction in Java.

Does anyone know of any sample Java code anywhere for accessing the ADSL vectors etc?

Feel free to post here, or email me if you prefer.

Thanks!

Don Brady

dbrady@pobox.com
Back to top
View user's profile Send private message Send e-mail
bvasanth
PostPosted: Tue Jun 08, 2004 4:47 am    Post subject: Reply with quote

Apprentice

Joined: 03 May 2004
Posts: 27
Location: Chennai, India

Regarding point #3 in my earlier posting, a data conversion exit has a issue that causes non-conversion of data from ASCII to EBCDIC from 2nd map field onwards. This had been identified and raised as PMR with IBM. Till such time, I convert the data from ASCII to EBCDIC in my java client program from 2nd map field onwards with first field remains ASCII.

Thanks.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » General IBM MQ Support » MQ-CICS Bridge - Pseudo-Conversion and ADS
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.