Skip to Content
0
Former Member
Mar 03, 2009 at 02:55 PM

File name to be generated from outbound text file data

58 Views

Hi Experts,

I am collecting IDOCs and generating IDOC-XML(for IDOCS) file and sending it to PI 7.0 using sender file adapter.

This is File to File scenario.

IDOC-XML file picked by sender file adapter gets transformed using XSL mapping in to .dat(text) file.

Sample Output of .dat file (target file)

STR SE 2008-10-3011:13:00$SEQ

EIH21148862 D2008102820081127SEK000000894800000000894800000000000000 0000XYZ co Ltd KL25533781 2114886209 335592 2508867

EIL21148862 0000000000000000100000000000020081021 335592 20081010KILLL899 Operating System

Now I want output file name to be: ABC_DEF_cc_yyyymmdd_segno.dat

ABC_DEF is constant

cc - means country code, in this case it should be "SE", which is marked in bold immediately after STR.

yyyymmdd - date format

segno - which means no of records like number of lines in text file, (say three records: STR, EIH, EIL)

Please feel free for any clarifications required.

I hope I am able to explain scenario.

I would really appreciate if you can help me with your valuable inouts.

Thanks,

Divyesh