Skip to Content

Generating new lines based on starting characters in content of text file in PI 7.3 dual stack

Hi Experts,

The scenario is NFS to SFTP where the input and output file would be a TXT file but the input file content should be seperated/start as next line when ever the content contains SIV or IL1. Is it possible in PI ? Please find the snippets of input & output files.

Input file:

Output file:

Kindly help me to achieve this requirement either through java mapping or something.

Thanks,

Ramu.

ip.jpg (43.8 kB)
op.jpg (56.2 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Dec 08, 2016 at 12:55 PM

    Hello Ramu,

    What type of text file it is? Is it not fixed length or delimited?

    Using string.split() within the java mapping get you records based on the parameter - in this case "SIV" and "IL1".

    Regards,

    Nikhil Bose

    Add comment
    10|10000 characters needed characters exceeded

  • Dec 08, 2016 at 03:45 PM

    Hi Nikhil,

    Is it not fixed length or delimited?

    - No, it is not delimited or fixed length.

    Here, I am using only ID objects no ESR objects. Can you please help me with Java mapping code to achieve this?

    Thanks,

    Ramu.

    Add comment
    10|10000 characters needed characters exceeded