Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] Reading Multiple Record Layout Fixed file

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] Reading Multiple Record Layout Fixed file
 Login/Join
 
Silver Member
posted
Hello,
I need some help in creating a FIX metadata to read a COBOL binary file(in EBCDIC format) transmitted to Windows operating system which has multiple record layouts as below -
DATE1 TIME1 REC1 X (120 in length) - occurs once, this is header
DATE2 TIME2 REC2 YYYY1 (352 length) - occurs multiple and has child records
DATE2 TIME2 REC3 ZZZZ1 (600 length)
DATE2 TIME2 REC3 ZZZZ2 (600 length)
DATE2 TIME2 REC3 ZZZZ3 (600 length)
DATE3 TIME3 REC2 YYYY2 (352 length)
DATE3 TIME3 REC3 ZZZZ4 (600 length)
DATE3 TIME3 REC3 ZZZZ5 (600 length)

In reality, the above doesn't have any carriage returns and looks like below -
DATE1 TIME1 REC1 XDATE2 TIME2 REC2 YYYY1DATE2 TIME2 REC3 ZZZZ1DATE2 TIME2 REC3 ZZZZ2DATE2 TIME2 REC3 ZZZZ3DATE3 TIME3 REC2 YYYY2DATE3 TIME3 REC3 ZZZZ4DATE3 TIME3 REC3 ZZZZ5

Firstly, is it possible to read this file in iWay as there are no carriage returns available to distinguish records? If so, how can I create a metadata for this?

Please advise, thanks in advance.

Note: I have tried using RECTYPE, KEY, MAPFIELD as outlined in the documentation but coulnd't get any closer to the solution.

This message has been edited. Last edited by: FP Mod Chuck,


WebFOCUS 8
Windows, All Outputs
 
Posts: 38 | Registered: July 25, 2016Report This Post
Expert
posted Hide Post
Have you tried creating a synonym directly from this source file (table, or whatever the source is)? And doing a TABLE FILE request / HOLD from it?

Does "600 length" mean the field format is "A600V"?

PS: Is there more to "WebFOCUS 8", like "8.x.x.x"?
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005Report This Post
Virtuoso
posted Hide Post
quote:
Originally posted by Avatar:
In reality, the above doesn't have any carriage returns and looks like below -
DATE1 TIME1 REC1 XDATE2 TIME2 REC2 YYYY1DATE2 TIME2 REC3 ZZZZ1DATE2 TIME2 REC3 ZZZZ2DATE2 TIME2 REC3 ZZZZ3DATE3 TIME3 REC2 YYYY2DATE3 TIME3 REC3 ZZZZ4DATE3 TIME3 REC3 ZZZZ5

Firstly, is it possible to read this file in iWay as there are no carriage returns available to distinguish records? If so, how can I create a metadata for this?


Yep. Make sure the code page is set properly, and you will have to set a LRECL to define the physical length or the records.

quote:

Please advise, thanks in advance.

Note: I have tried using RECTYPE, KEY, MAPFIELD as outlined in the documentation but coulnd't get any closer to the solution.


Get the original copy book and create the meta-data using it. The FIX adaptor will walk you through the process. Usually you will have to do some manual edits to complete the process, but it will give you a start ... including the OCCURS. You will have to set the RECTYPE column manually.

I've done this many many times, and so long the file was a FB on the mainframe, you should not have any problems getting this to work.


"There is no limit to what you can achieve ... if you don’t care who gets the credit." Roger Abbott
 
Posts: 1102 | Location: Toronto, Ontario | Registered: May 26, 2004Report This Post
Virtuoso
posted Hide Post
Avatar,

This worked for me:
  
FILEDEF AVATAR DISK AVATAR.TXT
-RUN
-WRITE AVATAR 20180101REC1FILE HEADER
-WRITE AVATAR 20180201REC2GROUPHEADER02
-WRITE AVATAR 20180201REC3ZZZZZZ0201
-WRITE AVATAR 20180202REC3ZZZZZZ0202
-WRITE AVATAR 20180203REC3ZZZZZZ0203
-WRITE AVATAR 20180301REC2GROUPHEADER03
-WRITE AVATAR 20180301REC3ZZZZZZ0301
-WRITE AVATAR 20180302REC3ZZZZZZ0312
-WRITE AVATAR 20180303REC3ZZZZZZ0315
-RUN
FILEDEF AVMAS DISK AVATAR.MAS
-RUN
-WRITE AVMAS FILENAME=AVATAR, SUFFIX=FIX
-WRITE AVMAS  SEGNAME=AVATAR, SEGTYPE=S0
-WRITE AVMAS   FIELDNAME=HDATE, ALIAS=HDATE, USAGE=YYMD, ACTUAL=A8, $
-WRITE AVMAS   FIELDNAME=RECTYPE, ALIAS=REC1, USAGE=A4, ACTUAL=A4, $
-WRITE AVMAS   FIELDNAME=HEADER, ALIAS=HD, USAGE=A10, ACTUAL=A10, $
-WRITE AVMAS  SEGNAME=GRP, PARENT=AVATAR, SEGTYPE=S0
-WRITE AVMAS   FIELDNAME=GDATE, ALIAS=GDATE, USAGE=YYMD, ACTUAL=A8, $
-WRITE AVMAS   FIELDNAME=RECTYPE, ALIAS=REC2, USAGE=A4, ACTUAL=A4, $
-WRITE AVMAS   FIELDNAME=GRHEADER, ALIAS=GRHD, USAGE=A13, ACTUAL=A13, $
-WRITE AVMAS  SEGNAME=ACCOUNT, PARENT=GRP, SEGTYPE=S0
-WRITE AVMAS   FIELDNAME=ADATE, ALIAS=ADATE, USAGE=YYMD, ACTUAL=A8, $
-WRITE AVMAS   FIELDNAME=RECTYPE, ALIAS=REC3, USAGE=A4, ACTUAL=A4, $
-WRITE AVMAS   FIELDNAME=VALUE, ALIAS=VL, USAGE=A10, ACTUAL=A10, $
-RUN
TABLE FILE AVATAR
PRINT ADATE VALUE
BY HEADER
BY GRHEADER
END


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

 
Posts: 1980 | Location: Tel Aviv, Israel | Registered: March 23, 2006Report This Post
Expert
posted Hide Post
Go RECTYPE.

Smiler


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Silver Member
posted Hide Post
Thanks for the suggestion, but I couldn't get no longer with this.
To simplify, here is the sample data and I need to read this as
1. Main Header (occurs 1) - WXYZHDR1
2. Sub Header (occurs many) - WXYZS11HDR1, WXYZS22HDR2
3. Detail (occurs many) - WXYZ11TLRTLR1 etc.

WXYZHDR1WXYZS11HDR1WXYZ11TLRTLR1WXYZ11TLRTLR2WXYZ11TLRTLR3WXYZS22HDR2WXYZ22TLRTLR4WXYZ22TLRTLR5

I tried with OCCURS=VARIABLE, but it worked until the first sub-header and messed up later. Hope to get some more suggestions on cracking this, cheers.

Note:
MAS used for the above sample -
FILENAME=SYNONYM01, SUFFIX=FIX ,
DATASET=ibisamp/tstfile.txt, $
SEGMENT=SEG1, SEGTYPE=S0, $
FIELDNAME=FIELD1, USAGE=A8, ACTUAL=A8, $
SEGMENT=SEG2, SEGTYPE=S0, PARENT=SEG1, OCCURS=VARIABLE, $
FIELDNAME=FIELD1, USAGE=A5, ACTUAL=A5, $
FIELDNAME=FIELD2, USAGE=A2, ACTUAL=A2, $
FIELDNAME=FIELD3, USAGE=A4, ACTUAL=A4, $
SEGMENT=SEG3, SEGTYPE=S0, PARENT=SEG2, OCCURS=VARIABLE, $
FIELDNAME=FIELD1, USAGE=A4, ACTUAL=A4, $
FIELDNAME=FIELD2, USAGE=A2, ACTUAL=A2, $
FIELDNAME=FIELD3, USAGE=A7, ACTUAL=A7,
MISSING=ON, $


WebFOCUS 8
Windows, All Outputs
 
Posts: 38 | Registered: July 25, 2016Report This Post
Virtuoso
posted Hide Post
Can you post the original copy book? That would help more.


"There is no limit to what you can achieve ... if you don’t care who gets the credit." Roger Abbott
 
Posts: 1102 | Location: Toronto, Ontario | Registered: May 26, 2004Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] Reading Multiple Record Layout Fixed file

Copyright © 1996-2020 Information Builders