cancel
Showing results for 
Search instead for 
Did you mean: 

file content conversion query

former_member183906
Active Contributor
0 Kudos

hi

i am working on PI 731 single stack

the scenario is file(fcc) to file(fcc)

(1) in file sender if the field A has value "X" then we do not have to process file. How can we achieve it ?

(2) Few fields we have to make Right justified,Zero to the left. Field B takes 5 character.If B gets the value 23,then output should be 00023. How can we achieve it.

Accepted Solutions (1)

Accepted Solutions (1)

engswee
Active Contributor
0 Kudos

Hi

1) On the receiver tab of your ICO, you can set an XPath condition for when you want to process the file (i.e. FieldA != X)

Then if no receiver is found, set it to Ignore.

2) You can check out the few options for padding zeroes in front in the following thread

Rgds

Eng Swee

former_member183906
Active Contributor
0 Kudos

(2) Few fields we have to make Right justified,Zero to the left. Field B takes 5 character.If B gets the value 23,then output should be 00023. How can we achieve it -

zero to left depends on input,input is dynamic ,if input is 2 then 4 zero to be added 00002, if input is 23 then 3 zeros to be added,so the link u shared is not helpful in it.

pls advise other stuff.

engswee
Active Contributor
0 Kudos

Hi

Please refer to my reply on that thread on using FormatNum.

For your case, use FormatNum with 5 zeroes (00000) and no decimal separator. This will take care of dynamic input value.

Rgds

Eng Swee

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi ,

(1) in file sender if the field A has value "X" then we do not have to process file. How can we achieve it ?

Fist check 'X' with exist function and  use createif .

(2) Few fields we have to make Right justified,Zero to the left. Field B takes 5 character.If B gets the value 23,then output should be 00023. How can we achieve it.

You can use length function with fix value to achieve the same

Thanks.

Former Member
0 Kudos

     Hi ,

This will take the values from the fix  value. suppose length is 18 then the value which is coming will be passed .If  length is 17 the one 0 will be added .If length is 16 then two 00 will be added.So it will be taking it dynamically .In your case its only 5 characters so can be easily handled with the above mapping I have given .

Thanks.