Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > Biztalk
|
Biztalk General discussion about Biztalk server.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Biztalk section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 3rd, 2005, 08:11 AM
Registered User
 
Join Date: Mar 2005
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Problem using positional flat file

NOTE: SCHEMA STRUCTURE AND FILE SAMPLES ARE GIVEN BELOW

Hello,

I am facing a strange problem while defining schema for following positional flat file...
Here the problem information goes:

1. Each line in the file is (CR-LF separated) and has a record type(20,40,50 etc) as mentioned below.
2. Numbers in the left of the file sample below, indicate the TAG IDNTIFIERS(01,10,20,40,50..90) used to identify each line type(Record type). (E.g. 20 is main transactional record, 50 is comment record and so on)
3. This file is organised into recurring groups and each group contains record type of 20(Mandatory) and 40,50,60 (Optional)
4. Record types 20 may be 1..n between a single group.
5. In some cases, if required, a 20 type record is followed by 0..n records of type 40,50 or 60.
6. Thus a single Business Record is formed by 20 (Mandatory) and any of 40,50,60 (0..n) [Optional]. Typical samples would be

Business Record 1: 20,
Business Record 2: 20,40
Business Record 3: 20,40,50
Business Record 4: 20,60
Business Record 5: 20,50
Business Record 6: 20,50,60

etc...

I am facing the problem to identify the records of type comment( 40,50,60 ) after I read 20s.
If file contains all records of type 20 ( In place of 40,50,60) then it goes smooth otherwise a sngle instance of any of 40,50,60 among 20 in a single group fails....

Can anyone please give me some clue on what is going wrong?

Present schema structure is :

Root
--File Header(Only 1 instance)
----Groups(1..n instances)
------Group Header(Only 1 instance)
--------Business records(1..n instances)
----------Business Record(Only 1 instance)
----------Comment Record 1(0..n instances)
----------Comment Record 2(0..n instances)
----------Comment Record 3(0..n instances)
--------Business records
------Group Trailer
----Groups
--File Trailer



File Sample:

01<<POSITIONAL RECORD>> - File Header
10<<POSITIONAL RECORD>> - Group Header , Group "A1" Starts here
20<<TRANSACTIONAL POSITIONAL RECORD>> - Main record
50<<COMMENT POSITIONAL RECORD TYPE 1>> - Comment record type 1
20<<TRANSACTIONAL POSITIONAL RECORD>> - Main record
50<<COMMENT POSITIONAL RECORD TYPE 1>> - Comment record type 1
20
50
20
20
20
40<<COMMENT POSITIONAL RECORD TYPE 2>> - Comment record type 2
20
20
20
50
20
20
20
50
20
90<<POSITIONAL RECORD>> - Group Trailer , Group "A1" ends here
10<<POSITIONAL RECORD>> - Group Header , New Group "A2" Starts here
20
20
20
20
60<<COMMENT POSITIONAL RECORD TYPE 3>> - Comment record type 3
20
50
20
50
20
20
60<<COMMENT POSITIONAL RECORD TYPE 3>> - Comment record type 3
60<<COMMENT POSITIONAL RECORD TYPE 3>> - Comment record type 3
20
20
20
90<<POSITIONAL RECORD>> - Group Trailer , Group "A2" ends here
.
.
.
.
. Multiple groups of Type "A" go here
.
.
.
99<<POSITIONAL RECORD>> - File Trailer





Similar Threads
Thread Thread Starter Forum Replies Last Post
Masking flat file longs Linux 0 August 2nd, 2007 04:50 PM
How to open up a flat file daniel_arney Beginning VB 6 1 September 27th, 2006 02:40 PM
flat file login new2php PHP How-To 0 February 7th, 2006 07:02 AM
ComplexType Import Flat File Problem pn609 Biztalk 0 January 20th, 2005 10:10 AM
importing from flat file PK problem olambe Classic ASP Databases 3 October 18th, 2004 04:09 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.