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 » Padding spaces in a multi-record BLOB

Post new topic  Reply to topic
 Padding spaces in a multi-record BLOB « View previous topic :: View next topic » 
Author Message
KSkelton
PostPosted: Tue Jan 24, 2006 2:16 pm    Post subject: Padding spaces in a multi-record BLOB Reply with quote

Apprentice

Joined: 28 Oct 2001
Posts: 45

I have a single message containing many delimited records.
I am parsing the message as a BLOB and replacing special characters etc.... I don't care about individual fields.

Each record has to become fixed length of 2000 bytes. All the records are written out as a single message.

I am able to do this with a WHILE loop but was wondering if I could accomplish the same thing with the SPACE and OVERLAY function (and compare performance).

SPACE is used instead of creating a huge BLOB variable with multiple x'20' entries.

DECLARE inDATA BLOB;
DECLARE outDATA BLOB;
DECLARE spaceStr CHAR;

SET recLen = 2000;
SET spaceStr = SPACE(recLen);
SET outData = OVERLAY(spaceStr PLACING inData FROM 1 FOR inLen);


Of course this creates CAST errors. But anytime I try and CAST one of the variables I receive the following:

Text = String is not of correct form for byte array. Must consist of only 0..9,a..f,A..Z
Catalog = BIPv500
Severity = 3
Number = 2590
Insert =
Type = 5
Text =

Is there a way to CAST this function to work with BLOBs?
Back to top
View user's profile Send private message Visit poster's website
JT
PostPosted: Tue Jan 24, 2006 5:02 pm    Post subject: Reply with quote

Padawan

Joined: 27 Mar 2003
Posts: 1564
Location: Hartford, CT.

Specify the CCSID on the CAST instruction?
Back to top
View user's profile Send private message
KSkelton
PostPosted: Wed Jan 25, 2006 7:08 am    Post subject: CCSID worked Reply with quote

Apprentice

Joined: 28 Oct 2001
Posts: 45

Indeed...Thanks.

CAST(spaceStr AS BLOB CCSID 1208)
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Padding spaces in a multi-record 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.