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 » option to make copy book fields as optional

Post new topic  Reply to topic
 option to make copy book fields as optional « View previous topic :: View next topic » 
Author Message
sandy vish
PostPosted: Sun Nov 18, 2012 4:14 am    Post subject: option to make copy book fields as optional Reply with quote

Apprentice

Joined: 18 Nov 2012
Posts: 27

hi all,

Is there any way of making the Cobal Copy book (CPY) fields as 'Optional' in Websphere Message Broker (WMB v7.1)
Back to top
View user's profile Send private message
Vitor
PostPosted: Sun Nov 18, 2012 5:03 am    Post subject: Re: option to make copy book fields as optional Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

sandy vish wrote:
Is there any way of making the Cobal Copy book (CPY) fields as 'Optional' in Websphere Message Broker (WMB v7.1)


No, because a Cobol copybook can't have optional fields. It's a positional structure so if an optional field is omitted even Cobol can't correctly parse it.

The closest legal structure in Cobol is an OCCURS DEPENDING ON which isn't optional, but does allow for parts of the structure to be limited to below their maximum size.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
kimbert
PostPosted: Mon Nov 19, 2012 5:26 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Vitor is correct. Why do you need/want to do this?
Back to top
View user's profile Send private message
sandy vish
PostPosted: Mon Dec 10, 2012 10:20 pm    Post subject: Reply with quote

Apprentice

Joined: 18 Nov 2012
Posts: 27

we have more than 100 fields, in which most of them are optional so inorder to handle this we have enabled Create Null values for all fields and NullCharacter to "NUL" when creating MessageDefiantion file from cobol copy file ,so is this approach correct way of handling this situation or else do we need to explicitly change in each field as 1)Nillable enable 2)NullLitralFil 3)encoding Value 'Nul'. Please suggest
Back to top
View user's profile Send private message
kimbert
PostPosted: Tue Dec 11, 2012 1:13 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Thanks - that was a lot more useful than your first question.

Your fields are not 'optional'. The fields are always present in the COBOL data, but they sometimes have a special value. Treating the fields as nulls is the normal way to handle this.
Quote:
or else do we need to explicitly change in each field as 1)Nillable enable 2)NullLitralFil 3)encoding Value 'Nul'. Please suggest
OK - I will assume that your 'optional' fields are being filled with low-values ( nulls ). In which case the COBOL importer is probably doing the right thing for you.

Just wondering, though...if all of your acceptance tests are passing, then why are you asking for advice? Are you still getting unexplained errors?
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 » option to make copy book fields as optional
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.