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 Interchange Server + Adapters » API for filing up an attribute with some value

Post new topic  Reply to topic
 API for filing up an attribute with some value « View previous topic :: View next topic » 
Author Message
amateur10
PostPosted: Mon Nov 28, 2005 10:38 pm    Post subject: API for filing up an attribute with some value Reply with quote

Centurion

Joined: 23 Nov 2005
Posts: 102

Can some one suggest me what api can be used to fill up an attribute with particular value say ' ' or 0.

thanks
Back to top
View user's profile Send private message
sdng
PostPosted: Tue Nov 29, 2005 12:21 am    Post subject: Reply with quote

Acolyte

Joined: 23 Nov 2005
Posts: 53

it's not enough inf..
you can use method set with '' or 0 or null
Back to top
View user's profile Send private message
amateur10
PostPosted: Tue Nov 29, 2005 5:52 am    Post subject: Reply with quote

Centurion

Joined: 23 Nov 2005
Posts: 102

I have been asked not to use SETVALUE but use dpt api to fill the attribute with '0' or spaces.

Could you please suggest

I looked at all api there are only fill right or fill left. no such an api to fill with some value.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Tue Nov 29, 2005 6:01 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Maybe you should ask whoever told you not to use SETVALUE what you should do instead.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
sdng
PostPosted: Tue Nov 29, 2005 6:16 am    Post subject: Reply with quote

Acolyte

Joined: 23 Nov 2005
Posts: 53

Do you say about:
DtpUtils class
public static String padLeft(String src, char padWith, int totalLen)
public static String padRight(String src, char padWith, int totalLen)
?
Back to top
View user's profile Send private message
amateur10
PostPosted: Tue Nov 29, 2005 6:34 am    Post subject: Reply with quote

Centurion

Joined: 23 Nov 2005
Posts: 102

it seems very simple. but I have never done it. So, lets say i have to fill up a attribiute of a bo. how I can mention that. I know programmably but trying to use the API

bo.attribute.ladLeft(xxx,xxx,xxx)

is it something like this?
Back to top
View user's profile Send private message
sdng
PostPosted: Tue Nov 29, 2005 6:55 am    Post subject: Reply with quote

Acolyte

Joined: 23 Nov 2005
Posts: 53

bo.set(<AttributeName>,DtpUtils.padLeft(bo.getString(<AttributeName>),<padWith>,<totalLen>);
Back to top
View user's profile Send private message
Ratan
PostPosted: Tue Nov 29, 2005 10:14 am    Post subject: Reply with quote

Grand Master

Joined: 18 Jul 2002
Posts: 1245

API to set a value for a bo attribute is

<BO>.set("<attribute>", "<Value>);

Go thorugh the API documentation.
_________________
-Ratan
Back to top
View user's profile Send private message Send e-mail
amateur10
PostPosted: Tue Nov 29, 2005 10:19 pm    Post subject: Reply with quote

Centurion

Joined: 23 Nov 2005
Posts: 102

thanks guys
i solved my problem
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 Interchange Server + Adapters » API for filing up an attribute with some value
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.