Schema file
Moderators: chulett, rschirm, roy
Schema file
Hi ,
In my input file contains only emp_id and emp_firstname and there is no value for emp_lastname.
Input file as:
12345James
But I need to create ds with emp_id , emp_firstname with value and emp_lastname with null value.
schema file contains :
record
{record_delim='n', record_length=fixed, delim=none}
(
emp_id: decimal[5,0] {width=5};
emp_firstname:nullable string[5] {width=5, null_file=' '};
emp_lastname:nullable string[5] {width=5, null_field=' '};
)
But it is not working .Please help me how to make schema file to handle in this case.
Thanks.
In my input file contains only emp_id and emp_firstname and there is no value for emp_lastname.
Input file as:
12345James
But I need to create ds with emp_id , emp_firstname with value and emp_lastname with null value.
schema file contains :
record
{record_delim='n', record_length=fixed, delim=none}
(
emp_id: decimal[5,0] {width=5};
emp_firstname:nullable string[5] {width=5, null_file=' '};
emp_lastname:nullable string[5] {width=5, null_field=' '};
)
But it is not working .Please help me how to make schema file to handle in this case.
Thanks.
Jothi
Schema what I provided is giving error message:
record
{record_delim='n', record_length=fixed, delim=none}
(
emp_id: decimal[5,0] {width=5};
emp_firstname:nullable string[5] {width=5, null_file=' '};
emp_lastname:nullable string[5] {width=5, null_field=' '};
)
Otherwise , Please help me how to acheive in this case.
record
{record_delim='n', record_length=fixed, delim=none}
(
emp_id: decimal[5,0] {width=5};
emp_firstname:nullable string[5] {width=5, null_file=' '};
emp_lastname:nullable string[5] {width=5, null_field=' '};
)
Otherwise , Please help me how to acheive in this case.
Jothi
Thanks a lot Chulett.
At present I don't have datastage access. What I am trying to ask is
If I write schemafile like below , then first 5 digits assign to emp_id an next first characters will assign to emp_firstname. Is that correct?
emp_id: decimal[5,0] {width=5};
emp_firstname:nullable string[5] {width=5, null_file=' '};
emp_lastname:nullable string[5] {width=5, null_field=' '};
In this case, I wanted to assign first 5 digits to emp_id and then next first characters to emp_lastname not emp_firstname. But I want to keep this firstname in my ds as null. I don't know which option I need to use (I tried skip option and fill option) but no use.
Hope you understood.
At present I don't have datastage access. What I am trying to ask is
If I write schemafile like below , then first 5 digits assign to emp_id an next first characters will assign to emp_firstname. Is that correct?
emp_id: decimal[5,0] {width=5};
emp_firstname:nullable string[5] {width=5, null_file=' '};
emp_lastname:nullable string[5] {width=5, null_field=' '};
In this case, I wanted to assign first 5 digits to emp_id and then next first characters to emp_lastname not emp_firstname. But I want to keep this firstname in my ds as null. I don't know which option I need to use (I tried skip option and fill option) but no use.
Hope you understood.
Jothi
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact: