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 » Urgent! WTX/ITX support for Cobol

Post new topic  Reply to topic
 Urgent! WTX/ITX support for Cobol « View previous topic :: View next topic » 
Author Message
yaakovd
PostPosted: Tue Mar 22, 2016 10:44 pm    Post subject: Urgent! WTX/ITX support for Cobol Reply with quote

Partisan

Joined: 20 Jan 2003
Posts: 319
Location: Israel

Hi ALL

I am trying to evaluate if WTX for z/OS V9 (the recently announced version) fits in a COBOL based development customer. I have some questions regarding its support for COBOL based copy books:

Cobol REDEFINE support:
If I understand correctly , when you have a Cobol based copy book that describe a structure of a record, you can use the COBOL Copybook Importer that comes with WTX to generate a tree to be used in WTX. When the Copybook includes a REDEFINE clause , you can use the Partitioning feature of WTX to implement the REDFINE
to have a subtypes.

What happens if we have multiple REDFINE clauses within REDFINE clauses (nested)? Does WTX support this ? How ?

Simple example:

Code:
05  A               PICTURE 9999.
 05  B REDEFINES A   PICTURE 9V999.
 05  C REDEFINES B   PICTURE 99V99.


Cobol OCCURS / OCCURS DEPENDING ON support:

The COBOL importer used to support the OCCURS clause of cobol. But now , the documentation have 2 sub sections on the importer : one "deprecated" and one "regular".
I dont understand if the OCCURS support is deprecated or not.

What is the status of this ? How is it supported ? (do we need to manually define a create a component rule for DEPENDING ON ? Or is it defined automatically ?)

Examples (for OCCOURS with & without DEPENDING ON):
Code:

01 WS-TABLE.
   05 WS-A OCCURS 10 TIMES.
      10 WS-B PIC A(10).
      10 WS-C OCCURS 5 TIMES.
         15 WS-D PIC X(6).

01  MAIN-AREA.
    03 REC-1.
        05 FIELD-1                       PIC 9.
        05 FIELD-2 OCCURS 1 TO 5 TIMES
           DEPENDING ON FIELD-1          PIC X(05).
01  REC-2.
    03 REC-2-DATA                        PIC X(50).


I would appreciate if you can advise as soon as possible.
_________________
Best regards.
Yaakov
SWG, IBM Commerce, Israel
Back to top
View user's profile Send private message Send e-mail
fjb_saper
PostPosted: Wed Mar 23, 2016 4:24 am    Post subject: Reply with quote

Grand High Poobah

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

Well Yaakov, I am a little bit surprised that you are looking at WTX for this as I'd expect it to be handled by DFDL.

However you need to be aware that REDEFINES are usually set up as choices and as such you need to know which branch of the choice to take. Once that has been fixed there is no going back and saying "sorry, I really meant to use the other branch", although I understand you may do that in COBOL.

Point in case:
Code:
05  A               PICTURE 9999.
 05  B REDEFINES A   PICTURE 9V999.
 05  C REDEFINES B   PICTURE 99V99.

In order to parse correctly you would need to know before you come to A whether you want no decimal point, a decimal point after the first digit, or after the second digit, i.e. you'd need some way to resolve the choice.

Have fun
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
mqjeff
PostPosted: Wed Mar 23, 2016 5:59 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

I'm reasonably certain that DFDL is a back tracing parser. So if it finds that it's started parsing something as one choice, and that fails, it will go back to the start of the section, and try the next choice.

So if it finds a decimal point, it knows that it's not the A and will try B. If it finds two digits before the decimal, it will know that it's not A or B and will try C.
_________________
chmod -R ugo-wx /
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Wed Mar 23, 2016 6:04 am    Post subject: Reply with quote

Grand High Poobah

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

I got confused by the internal representation of COBOL numbers which may have no decimal point at all, the decimal point being defined by the pic clause... especially when you use a compressed format...
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
mqjeff
PostPosted: Wed Mar 23, 2016 6:23 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Well, they're pic clauses, yes?

Not numbers, and not compressed format numbers...

Granted, my memories of cobol formats in IIB are very out of date...
_________________
chmod -R ugo-wx /
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Wed Mar 23, 2016 7:10 am    Post subject: Reply with quote

Grand High Poobah

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

mqjeff wrote:
Well, they're pic clauses, yes?

Not numbers, and not compressed format numbers...

Granted, my memories of cobol formats in IIB are very out of date...


Well my main point was: how would you be able to discriminate between the different choices... especially as all of them could be valid to the parser... (thinking more of compressed formats here...).
I know it's not efficient, but is it possible to have a discriminating element downstream from the choice element ??
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
mqjeff
PostPosted: Wed Mar 23, 2016 7:52 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

fjb_saper wrote:
mqjeff wrote:
Well, they're pic clauses, yes?

Not numbers, and not compressed format numbers...

Granted, my memories of cobol formats in IIB are very out of date...


Well my main point was: how would you be able to discriminate between the different choices... especially as all of them could be valid to the parser... (thinking more of compressed formats here...).
I know it's not efficient, but is it possible to have a discriminating element downstream from the choice element ??


Again. The DFDL is a back tracing parser. So, yes, you could likely use a downstream discriminator. But it would have to be part of each redefine. I think.

But a redefine has to have different data in it - pic formats or fields or etc. Otherwise it's not a redefine. So the DFDL parser should be able to discriminate on those, even with packed decimals / compressed formats.
_________________
chmod -R ugo-wx /
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Mar 23, 2016 7:56 am    Post subject: Reply with quote

Grand High Poobah

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

mqjeff wrote:
But a redefine has to have different data in it - pic formats or fields or etc. Otherwise it's not a redefine. So the DFDL parser should be able to discriminate on those, even with packed decimals / compressed formats.




You're less likely to have
Code:

03  A               PICTURE 9999.
 05  B REDEFINES A   PICTURE 9V999.
 05  C REDEFINES B   PICTURE 99V99.


than you are to have

Code:

03 A PIC X(5).
    05  B REDEFINES A PIC 9(5).

_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
timber
PostPosted: Wed Mar 23, 2016 8:39 am    Post subject: Reply with quote

Grand Master

Joined: 25 Aug 2015
Posts: 1292

I agree; DFDL is the obvious choice for handling COBOL ( and there is a very good COBOL importer for DFDL ) unless there are some pretty strong reasons for using WTX.
As discussed above, you will need to tell the DFDL parser how to resolve the REDEFINES, but that's necessary whatever technology you use.
Back to top
View user's profile Send private message
yaakovd
PostPosted: Wed Mar 23, 2016 10:25 am    Post subject: Reply with quote

Partisan

Joined: 20 Jan 2003
Posts: 319
Location: Israel

Hi everybody

thank you for attention.
I made big project with the same client on Message Broker, and you are right, but in this case use of DFDL is problematic since all process should be done on mainfraim and IIB will not be a choice of this client.
Actually we are looking for replacement of current ETL process on mainframe after IBM product end of life. Datastage on open can be an option, unfortunately ETL is very bounded to both source and target programs - big mess.
So, ITX would be not the best, but less painful alternative.

Now, if I understand you correctly, copybook will require some editing prior to import into ITX, otherwise it will be confused during parsing of redifine?
_________________
Best regards.
Yaakov
SWG, IBM Commerce, Israel
Back to top
View user's profile Send private message Send e-mail
timber
PostPosted: Wed Mar 23, 2016 1:07 pm    Post subject: Reply with quote

Grand Master

Joined: 25 Aug 2015
Posts: 1292

Quote:
in this case use of DFDL is problematic since all process should be done on mainfraim and IIB will not be a choice of this client.
Fair enough. In that case, I think you will get a better quality of answer from a WTX forum. We're not WTX experts here ( well, I'm not anyway ).
Back to top
View user's profile Send private message
yaakovd
PostPosted: Wed Mar 23, 2016 11:09 pm    Post subject: Reply with quote

Partisan

Joined: 20 Jan 2003
Posts: 319
Location: Israel

timber, would you share a link, please?
_________________
Best regards.
Yaakov
SWG, IBM Commerce, Israel
Back to top
View user's profile Send private message Send e-mail
timber
PostPosted: Thu Mar 24, 2016 1:03 am    Post subject: Reply with quote

Grand Master

Joined: 25 Aug 2015
Posts: 1292

https://www.ibm.com/developerworks/community/forums/html/forum?id=11111111-0000-0000-0000-000000000829
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 » Urgent! WTX/ITX support for 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.