Five Stars

tFileInputMSPositional With "!=" condition

My file contains Header values like below.
"1"
"2"
"3"
"4"
"5"
"6"
I am able to process above Header value rows with their respective schema.
but file has last schema with header value like
!=1 || !=2 || !=3 || !=4 || !=5 || !=6 || !=7 || ==10
so is there any way to specify multiple Header values for a single schema with && or || operator please suggest.
8 REPLIES
Moderator

Re: tFileInputMSPositional With "!=" condition

Hi,
Would you mind setting a example for your expected result? and what is your work flow?
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Five Stars

Re: tFileInputMSPositional With "!=" condition

Below is sample positional file which has 6 MS schemas. and each schema is separated with header value. here is the pattern for header value.
"1,3,8,4
if you can see I am having below header value for 2nd field. those are as follows.
101
106
102
103
104
105
apart from above listed header value,we have to redirect not matching values to different schema.

A101201202184545
E106201202184545
B102201202184545
C103201202184545
B102201202184545
D104201202184545
E105201202184545
D104201202184545
E106201202184545
A101201202184545
E106201202184545
D104201202184545
A101201202184545
A101201202184545
E106201202184545
D104201202184545
P301201202184545
J307201202184545
K310201202184545
S410201202184545

see the screen for job design... is there any other way to do it?
One Star

Re: tFileInputMSPositional With "!=" condition

You only need 1 schema and use a condition for selecting output in the Expression filter of tMap of the output.
So you would have 7 outputs connected to the 7 files.
Five Stars

Re: tFileInputMSPositional With "!=" condition

@janhess i think you for solution but, i think you are not getting my question i have file with 7 different schemas. i am able to get all 6 schemas but using MS positional file but 7 th schema has multiple conditions so I am using reject connector to get any things else which is not matching with previous 6 schemas then using tmap to make 7 condition to redirect for 7 schema. apart from that i am searching for solution which will do it within a MS positional file. using tMap I have done it.
One Star

Re: tFileInputMSPositional With "!=" condition

You can use my solution to split the data. Just have an extra column that covers the rest of the data in the record.
Five Stars

Re: tFileInputMSPositional With "!=" condition

I Agree with you but i am having a Positional file which has multiple schemas.
please see my example file paste.
first schema has 100 columns
second schema has 88 columns and so on for other not every schema has same number of columns.
like that we have more than 7 schemas and each one is distinguish using one column value. in your scenario we have to read full row and then need to add Extract Positional filed component to get columns based on conditions. other wise we have to do sub string in Tmap to create columns based on schema.
Check for MS Positional component.
One Star

Re: tFileInputMSPositional With "!=" condition

Sorry. Thought you just wanted to split the file into multiple files. You could process the reject file by reading it as an input and specifying it's schema.
One Star

Re: tFileInputMSPositional With "!=" condition

Umesh - is this resolved?
I am still not sure, if we can use regex / wildcards in Header Values field.