Focal Point
COBOL OCCURS DEPENDING ON in transformer tool

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/1381057331/m/215107352

September 30, 2009, 09:12 AM
AdeH
COBOL OCCURS DEPENDING ON in transformer tool
Hi,
I need to define a COBOL input structure in the transformer tool that has a number of OCCURS DEPENDING ON clauses in it.

I've asked the sending system if they can flatten the structure, but that will
result in a massive input document, with most elements blank/empty, which they
don't want to do.

Is it possible to define a CDF or FIXED WIDTH input structure that will cater
for the repeating groups, occuring x number of times depending on another field
in the input structure?

Any tips or good ideas appreciated!

Thanks in advance,
Ade


iWay 5.5 SMSP1 and 6.0.1 on Intel/Linux
October 01, 2009, 07:04 AM
M Cavanaugh
Adeh,
I have successfully used the COBOL-To-FOCUS translator (CTF) to define all types of files (VSAM, IMS, sequential) for many years - yes I am an oldie but goodie Smiler

The file structure does not have to be flatten, just include the entire COBOL description as input into the translator. The CTF knows how to handle nested descriptions with different field layouts. This will give you a pretty good MASTER. You will probably have to tweak it but CTF will supply an excellent starting point and save you hours of time.

There is documentation in the 'COBOL FD Translator Users Manual and Installation Guide'. I believe this used to be contained within the 'Power Book' documentation but I might be wrong.

If all else fails - open a ticket with IBI and the FOCUS group will help you.

Good Luck,
Michelle


WebFOCUS Production: UNIX 7.7.03M
WebFOCUS Test: UNIX EDASERVE 7.7.05 Client 8.0.01
October 01, 2009, 02:50 PM
Baillecl
Hi, a subject for an old guy
If the Occuring variable "segment" in the end of the record :
Occurs = Variable is ok ( The end of the record will tell Focus that this Occurs is Finished)
ALIAS=ORDER ( the last Field of the Occurring Segment is purely Virtual : Focus deliver the Rank of the Occurring Child).
If the Number of Occurrences is a real (Numeric) field preceding the Occuring Segment,
Let's say DIMSEG field, then OCCURS=DIMSEG will be all right
Cordially and Focusely
FILE=CILL310B ,SUFFIX=FIX
SEGNAME=THEPAPA ,SEGTYPE=S03
FIELDNAME =AP_APP_NOM , ,A8 ,A08 ,$
FIELDNAME =AP_OWNER , ,A8 ,A08 ,$
FIELDNAME =AP_REQ_NOM , ,A8 ,A08 ,$
FIELDNAME =IND_REQUETE , ,I04 ,I04 ,$
FIELDNAME =AP_REQ_DESC , ,A50 ,A52 ,$
$
SEGNAME=PSEUFILS,PARENT=THEPAPA,OCCURS=VARIABLE,$
FIELDNAME =CAR_FILS , ,A001, A001,$
FIELDNAME =IND_FILS ,ORDER ,I008, I004,$
**************************** Bottom of Data ************************


Focus Mainframe 7.6.11
Dev Studio 7.6.11 and !!!
PC Focus, Focus for OS/2, FFW Six, MSO
October 02, 2009, 06:10 AM
AdeH
Hi Michelle and Baillecl,
Thanks loads for the tips, I appreciate that you have made the effort to reply very much.

Unfortunately, I'm using iWay, not WebFOCUS Frowner

Got to say, FOCUS does sound easier to define this COBOL file in though!

Thanks again,
Ade.


iWay 5.5 SMSP1 and 6.0.1 on Intel/Linux
October 03, 2009, 05:44 AM
M Cavanaugh
Just an FYI - there is a copy of FOCUS running under the covers within iWay that contains the CTF. CTF use to only be available via EDA (a.k.a. iWay) for years.

Check with IBI to see how you can access the CTF within iWay.

Have fun!
Michelle


WebFOCUS Production: UNIX 7.7.03M
WebFOCUS Test: UNIX EDASERVE 7.7.05 Client 8.0.01
October 03, 2009, 08:20 PM
Endre
AdeH,

Never say "unfortunetly" I'm using iWay, not WebFOCUS. :-)

Endre


WebFocus 7.6.8
iWay Data Migrator 7.6.8
PMF 5.1
October 08, 2009, 05:41 AM
AdeH
Hi,
Thanks again for the answers, I've raised a case with IB asking if we can use the CTF translator. I'll update if I find anything positive.

AdeH.


iWay 5.5 SMSP1 and 6.0.1 on Intel/Linux
October 13, 2009, 03:40 AM
AdeH
Hi,
Well I asked the question, and got the answer that "unfortunately" iSM does not include a copy of FOCUS Smiler

I've been pointed at the CICS Preparser, which it appears, can handle OCCURS DEPENDING ON...

More trial and error to come!


iWay 5.5 SMSP1 and 6.0.1 on Intel/Linux