#1 2012-02-29 12:43:37

pnbalaji
Member
Registered: 2012-02-14
Posts: 52

Creating a multi schema file

Hi,

I have a requirement to create an output file as shown below.

============================================================================================
PID=000023 FD000023 SID=000023 FD000023 START  120219 3.0.0   
                                                         
S0000100206006A41F8-9999999      AUAX11111111111111111111115000000004105840   7                N                6822   
ABCAMEL GRINDING WHEELS         H8004474248                                                                             
A27525 N OAK PARK AVE                                                                                                   
A3NILES, IL 60714-3819                                                                                                 
S0000100206006A41F8-9999999      AUAX11111111111111111111115000000004105840   7                N                6822   
ABHAMPTON INN & SUITES          H2624381500                                                                             
A21975 S 18TH AVE                                                                                                       
A3WEST BEND, WI 53095-8797                                                                                             
S0000100206006A41F8-9999999      AUAX11111111111111111111115000000004105840   7                N                6822   
ABATT                           H00                                                                                     
A2410 W DAISY LN                                                                                                       
A3NEW ALBANY, IN 47150-4568                                                                                             
S0000100206006A4204-9999999      AUVI11111111111111111111114000000009725840   7                N                6822   
ABUPS                           H00                                                                                     
A2567 MALLARD CREEK RD                                                                                                 
A3LOUISVILLE, KY 40207-5444                                                                                             
S0000100206006A4208-9999999      AUVI11111111111111111111113000000029101840   7                N                6822   
ABSILLIMAN, MONTE               H00                                                                                     
A23003 SE SPYGLASS DRIVE                                                                                               
A3VANCOUVER, WA 98683                                                                                                   

B RECS=000000102 ORDS=000000025 $TOT=00000000230621 $SALE=00000000000000 $REFUND=00000000000000                         
T RECS=000000103 ORDS=000000025 $TOT=00000000230621 $SALE=00000000000000 $REFUND=00000000000000                         
PID=000023 FD000023 SID=000023 FD000023 END  120219                                                                     
EOFEOFEOF
============================================================================================

As we see, there is one batch header record that starts with PID=000023 and there 4 batch trailer records at the end. For each order, there will be a set of 4 records in the middle. 1 record that starts with S, 1 record that starts with AB, 1 record that starts with A2 and 1 record that starts with A3. How do I generate this kind of a file? I am sure I need to use the tFileOutputMSPositional object, but not sure how to use. For the batch header and trailer records, I can generate them with tFixedFlowInput (most of them are static data or accumulated data and I can get them using context variables).

This is what I am thinking.

tFixedFlowInput     ==> tFileOutputPositional        ======
      |                                                                             |           concatenate
Salesforce objects ==> tFileMSPositional             ====> tMAP ===========> tFileOutputPositional
      |                                                                             |
tFixedFlowInput     ==> tFileOutputPositional       ======


Let me know this will work or is there a better way to do this. Also, how do I concatenate 3 files into one?

Thanks,
Balaji.

Offline

#2 2012-03-01 06:33:55

pedro
Member
Registered: 2011-11-17
Posts: 3682

Re: Creating a multi schema file

Hi

tFixedFlowInput     ==> tFileOutputPositional
      |         
  OnSubjobOk
      |                                                                             
Salesforce objects  ====> tMAP ===========> tFileOutputPositional
      |
  OnSubjobOk
      |                                                                             
tFixedFlowInput     ==> tFileOutputPositional

If you want to concatenate 3 files into one, check "Append" of tFileOutputPositional.


Regards,
Pedro


Only Paranoid Survive.

Offline

#3 2012-03-01 13:46:19

pnbalaji
Member
Registered: 2012-02-14
Posts: 52

Re: Creating a multi schema file

Thanks Pedro, I could see that the tFileOutputMSPositional component is not listed in your diagram, which is required for creating the multi record layout of detail records.

Let me know if I am missing something.

Also, I have extracted all the required data from mutltiple salesforce objects and written into a positional file. So, in case if the job fails for some reason, I don't need to read the salesforce objects again. I need to create the multi record layout file from this positional file. I am planning to have 4 schemas for the tFileOutputMSPositional component as below.

s0rec         ==> for the S record
abrec         ==> for the customer name record
a2rec         ==> for address record
a3rec         ==> for city, state, zip record.

All the data required for these four schemas are available in a single record of the extract file. I can blow out 1 record of the extract file into 4 different records of the tFileOutputMSPositional component, correct?

Thanks,
Balaji.

Offline

#4 2012-03-05 09:36:47

paddysmith
New member
Registered: 2012-03-05
Posts: 1

Re: Creating a multi schema file

What is the best way to generate C# classes from multiple XSD schema files?

Offline

Board footer

Powered by FluxBB