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 » Assigning Default values for Numeric and Character in COBOL

Post new topic  Reply to topic
 Assigning Default values for Numeric and Character in COBOL « View previous topic :: View next topic » 
Author Message
deepak_paul
PostPosted: Mon Jun 28, 2010 4:04 pm    Post subject: Assigning Default values for Numeric and Character in COBOL Reply with quote

Centurion

Joined: 04 Oct 2008
Posts: 147
Location: US

All,

While we are generating COBOL based message, we need to set zeros for numerics (int/long/short) and SPACES for character fields as default. We went through all the possible options in importing the COBOL message(SPACES/x'00'/x'FF'/NUL) but nothing really serve both cases.

SPACES - > Puts spaces for all types of fields(including numerics)
NUL - > puts zeros in all types of fields(including Characters)

Is there any solution for this other than going into each field and change its NULLliteralvalue to its respective value (SPACE for character; NUL for numeric)?

Thanks
Paul
_________________
Regards
Paul
Back to top
View user's profile Send private message
kimbert
PostPosted: Tue Jun 29, 2010 1:11 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

I don't think the COBOL importer can do that.
Quote:
Is there any solution for this other than going into each field and change its NULLliteralvalue to its respective value (SPACE for character; NUL for numeric)?
There is no supported way to do that. However, a message definition file is just an xsd with annotations. Some brave people have found that it is possible to quickly change a lot of properties by modifying the mxsd file using a text editor or even a script.

Don't do this unless you are competent with text editors and/or scripting languages.
Back to top
View user's profile Send private message
Gralgrathor
PostPosted: Tue Jun 29, 2010 3:20 am    Post subject: Reply with quote

Master

Joined: 23 Jul 2009
Posts: 297

kimbert wrote:
Some brave people


Ah. I just posted a thread with a similar question. The choices are as follows:

A) I go through each field in the message type (in excess of 100 fields) and change the properties,

B) I do a search and replace on the MXSD file.

I really want an option C that allows somebody to quickly import a new copybook without having to retrace my steps. Otherwise message types can quickly become unmanageable. (Not that I don't document everything I do, but reading somebody else's documentation can be more of a bitch than reading somebody else's code.)
Back to top
View user's profile Send private message Send e-mail
kimbert
PostPosted: Tue Jun 29, 2010 3:28 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Fair comment - the requirement sounds very reasonable, and it has been noted. That comment does not imply anything about the content of future releases of WMB.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Tue Jun 29, 2010 1:39 pm    Post subject: Reply with quote

Grand High Poobah

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

Paul,

Looks to me like you try to have the COBOL structure at "initial" value.
We use spaces for NULL value all across and have no compressed fields (i.e text message). This way all our values are either valid or null.

In COBOL it is easy to initialize a structure to spaces.... however I agree it is not the same as "initial" value.

Have fun
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Assigning Default values for Numeric and Character in COBOL
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.