on 05-07-2012 2:29 AM
Hi Guys,
I am generating fixed length file.
When a field is has no value, I need to fill spaces in the output file.
Instead PI skipping the blank fields, so the fixed length file is not quite right.
Thanks
Sam
Hi,
If you are using fieldFixedLengths and fieldSeparator, then the spaces should have been added for the blank fields. Can you please let us know, what exactly the parameters you are using.
Thanks & Regards,
Samir
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I am using fieldFixedLengths, fixedLengthTooShortHandling and
fieldSeparator.
I am also using MapWithDefault node in the message mapping.
But I am getting "Constant" string for the empty fields in the output file.
Here is the output file
0090417724 | 0030300001 | Pharmacy - Ship To | PO Box 5515, Mission Bay | Constant | Constant | Auckland |
Here is my mapping..
Hi Sam,
add mapWithDefault box in message mapping. Then double click the box, delete the string "Constant". keep it blank here. It is used to create the filed in target structure, so in FCC, it would not skipped.
In FCC, if the length is less than given length. space would be added after the string as default.
Hope it would help for you.
Regards,
Kevin Song.
Hi Sam,
>>But I am getting "Constant" string for the empty fields in the output file.
Double click the Constant function in mapping and delete the string "constant" and keep it as empty in the constant function.
>> I am using fieldFixedLengths, fixedLengthTooShortHandling and
fieldSeparator.
There is no need to specify fieldSeparator when you have already specified fieldFixedLengths.
But by seeing the Output file i think your requirement is get the horizontal tab after every fieldFixedLenghts
if that is the case what you have specified is correct.
One more thing there is no need to specify the fieldNames in the Receiver comm channel
remove the fieldName parameter from the FCC.
I hope now you will get the required output.
Thanks
Sai
Hi Sam,
One more way is to simply assign the target fields with the constant in mapping .
Then in the receiver comm channel specify the RecordStructures
and in parameters
Ex:
RecordStructureName.fieldFixedLengths : 1,5 3
RecordStructureName.fixedLengthTooShortHandling : ignore
So even if the source fields has no value the output file will contain spaces(1,5,3) for Target fields.
Thanks
Sai
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
You should be able to handle this in mapping e.g by using the node function called mapWithDefault.
Regards,
Mark
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
11 | |
10 | |
9 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.