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 » WebSphere Message Broker (ACE) Support » Converting data structure in Enviroment.Variables to BLOB

Post new topic  Reply to topic
 Converting data structure in Enviroment.Variables to BLOB « View previous topic :: View next topic » 
Author Message
PieterV
PostPosted: Thu Aug 10, 2006 3:35 am    Post subject: Converting data structure in Enviroment.Variables to BLOB Reply with quote

Disciple

Joined: 04 Jan 2006
Posts: 164
Location: Belgium

I have a datastructure in:

Environment.Variables.BLOBTEMP = InputRoot.MRM;
this is:

Code:

Environment.Variables.BLOBTEMP
  |
  |- REC0
      |- ElementA
      |- ElementB
  |- REC1
      |- ElementC
      |- ElementD



I'm trying to cast this to BLOB:

i tried:
Code:

Environment.Variables.BLOB = BITSTREAM( Environment.Variables.BLOBTEMP);

Code:

Environment.Variables.BLOB = ASBITSTREAM( Environment.Variables.BLOBTEMP);

Code:

Environment.Variables.BLOB = CAST(ASBITSTREAM( Environment.Variables.BLOBTEMP) AS BLOB);

Code:

Environment.Variables.BLOB = CAST( Environment.Variables.BLOBTEMP AS BLOB);

this results always in Environment.Variables.BLOB BLOB = nothing

how can i parse that structure to a BLOB? Each of those element has a value, so there are no empty elements in the structure...
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Thu Aug 10, 2006 3:56 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

Read up in the documentation upon the ASBITSTREAM. You are not passing enough parameters...
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
PieterV
PostPosted: Thu Aug 10, 2006 4:29 am    Post subject: Reply with quote

Disciple

Joined: 04 Jan 2006
Posts: 164
Location: Belgium

you probably mean that we should pass parameters about the message set etc.
Am i correct?

if so, this is a problem for us. We created some virtual message with is not bound to a message set, and cannot be validated against one.
However we wish to have to structure of that virtual message in BLOB format.
Back to top
View user's profile Send private message
jsanchose
PostPosted: Thu Aug 10, 2006 4:35 am    Post subject: Reply with quote

Novice

Joined: 26 Apr 2006
Posts: 16

I think you need to define a MessageSet...

and type a sentence like:

SET Environment.Variables.BLOB =
CAST(ASBITSTREAM(Environment.Variables.BLOBTEMP
ENCODING 785 CCSID 500
SET yourMessageSet
TYPE yourMessageType
FORMAT yourMessageFormat
) AS CHARACTER CCSID 500 ENCODING 785);

NOTE: CCSID and ENCODING in this example are for EBCDIC.
Replace it with your own values.
Don´t change de parameters order if you don´t have any problem.
Back to top
View user's profile Send private message
PieterV
PostPosted: Thu Aug 10, 2006 4:52 am    Post subject: Reply with quote

Disciple

Joined: 04 Jan 2006
Posts: 164
Location: Belgium

@jsanchose

i tried your code.

it goest trough it without errors but the result is the same as mine: empty.


when i change Environment.Variables.BLOBTEMP to InputRoot.MRM (wich contains the same data), i get a CWF error.
That's because my virtual data structure doesnt match the logical structure of the message set because there are some records in the logical message that are not here. (altough i defined those missing records to be optional: mininum occurence is 0).


perhaps you have other ideas?
Back to top
View user's profile Send private message
kimbert
PostPosted: Thu Aug 10, 2006 5:33 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

How did you create Environment.Variables.BLOBTEMP? It needs to be owned by the MRM parser if you are going to serialize it using the MRM domain.
Code:
CREATE LASTCHILD OF Environment.Variables Domain 'MRM' name 'BLOBTEMP'

( untested code, but you get the idea ). That should sort out the first problem.

Quote:
i get a CWF error.
That's because my virtual data structure doesnt match the logical structure of the message set because there are some records in the logical message that are not here. (altough i defined those missing records to be optional: mininum occurence is 0).
I've already explained to you why the CWF writer is generating this error http://www.mqseries.net/phpBB2/viewtopic.php?t=31143. You cannot simply declare that fixed-length fields are optional. Omitting fields from the middle of a fixed-length message usually renders it unparseable. Have you set default values for the missing fields?
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 » WebSphere Message Broker (ACE) Support » Converting data structure in Enviroment.Variables to BLOB
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.