September 30, 2009, 09:12 AM
AdeHCOBOL 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
October 01, 2009, 07:04 AM
M CavanaughAdeh,
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
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
October 01, 2009, 02:50 PM
BailleclHi, 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 ************************
October 02, 2009, 06:10 AM
AdeHHi 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
Got to say, FOCUS does sound easier to define this COBOL file in though!
Thanks again,
Ade.
October 03, 2009, 05:44 AM
M CavanaughJust 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
October 03, 2009, 08:20 PM
EndreAdeH,
Never say "unfortunetly" I'm using iWay, not WebFOCUS. :-)
Endre
October 08, 2009, 05:41 AM
AdeHHi,
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.
October 13, 2009, 03:40 AM
AdeHHi,
Well I asked the question, and got the answer that "unfortunately" iSM does not include a copy of FOCUS
I've been pointed at the CICS Preparser, which it appears, can handle OCCURS DEPENDING ON...
More trial and error to come!