on 09-24-2008 8:24 AM
Hi ,
I have a structure with 3 fields and it is not mandatory that evytime all the fields has to come.
MH75 TEST1234 TEST12345
MH70 TEST1234 1
ML14 T1234
ML11 TEST1234 09151
ML62 TEST1234 4
I need to get the nextline once the record is ended like above.
1st record -- nextline has to come immediately after TEST12345
2nd record --nextline has to come immediately after 1
3rd record -- nextline has to come immediately after T1234
File COntent I used:
HEADER.fieldFixedLengths 5,17,177
HEADER.fixedLengthTooShortHandling Cut
HEADER.endSeparator 'nl'
But the output I am getting like below..
MH75 TEST1234 TEST12345
MH75 TEST1234 1
ML14 T1234
ML11 TEST1234 09151
Gap is coming If the value is coming. I dont want to get that gap when the field wont come. If the record stops at 2nd field then the nextline has to come immediatly and should not worry of 3rd field.
Please let me know if anyone knows.
Thanks
Seema.
Hi Seema,
Since you are using fixedFieldLength so because of this if the field won't come then also you will get gap.
What you can do is, if you know the incoming fields are space or tab delimated then use the below code in your sender CC.
HEADER.fieldNames field1,field2,field3
HEADER.fieldSeparator (if space, then just use notepad give one space then copy & paset it here.
in case of TAB also u can do the same trick)
HEADER.endSeparator 'nl'
Regards,
Sarvesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
use endSeparator = ' '
so each new record will be placed one after another separated by white space
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.