Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Write Table now available in Qlik Cloud Analytics: Read Blog
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

[resolved] Processing SWIFT Message

Hi,
I am trying to process the swift message. Please find the image attached.
I have added one routine called "SwiftParser" with the method "fieldParser(String fin)", which i am calling from the tJava component.
The swift message is hard-coded as of now.
My issue is that i want to read and pass the swift data to the tJava component from the file (instead of hard-coding).
I tried few way, but i am not able to do that.
Can you please help me in getting this done.
Labels (3)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Hi
tFileInputFullRow is better than tFileInputPositional to read row one by one, concatenate each line in tJavaFlex and store it into a globalMap, for example:
tFileInputFullRow--main--tJavaFlex
|
onsubjobok
|
tJava

on begin part of tJavaFlex:
String line="";
on main part of tJavaFlex:
line=line+row1.line+"\n";
on end part of tJavaFlex:
globalMap.put("line", line);
on tJava:
String line=(String)globalMap.get("line");
and then, call your routine;
Best regards
Shong

View solution in original post

5 Replies
Anonymous
Not applicable
Author

Hi,
Right now i am doing to following to achieve this. Not sure whether this is the right way. Please correct me if there is a better approach.
1) I used tFileInputPositional to read the file. I specified only one pattern, which is from the beginning of the record to end of the record.
2) Then use the tFlowToIterator to get each line one by one
3) Use tJava component to concatenate each line to one string and store it in the globalMap.
4) onSubJobOk user another tJava component to get the complete file content from the globalMap and process the record.

Sample Swift data
{1:F01BANKDEFMAXXX2039063581}{2 0683p000009MA5A.png1031609050901BANKDEFXAXXX89549829458949811609N}{3:{108:00750532785315}}{4:
:20:007505327853
:23B:CRED
:32A:050902JPY3520000,
:33B:JPY3520000,
:50K:EUROXXXEI
:52A:FEBXXXM1
:53A:MHCXXXJT
:54A:FOOBICXX
:59:/13212312
RECEIVER NAME S.A
:70:FUTURES
:71A 0683p000009M9p6.pngHA
:71F:EUR12,00
:71F:EUR2,34
-}";
Anonymous
Not applicable
Author

Hi
tFileInputFullRow is better than tFileInputPositional to read row one by one, concatenate each line in tJavaFlex and store it into a globalMap, for example:
tFileInputFullRow--main--tJavaFlex
|
onsubjobok
|
tJava

on begin part of tJavaFlex:
String line="";
on main part of tJavaFlex:
line=line+row1.line+"\n";
on end part of tJavaFlex:
globalMap.put("line", line);
on tJava:
String line=(String)globalMap.get("line");
and then, call your routine;
Best regards
Shong
Anonymous
Not applicable
Author

Hi Shong,
This was better. Thank you..!! 0683p000009MACn.png
Anonymous
Not applicable
Author

Hi,
For more details please refer the below post
http://www.talendforge.org/forum/viewtopic.php?pid=62105#p62105
Anonymous
Not applicable
Author

I'm thinking of a SWIFT connector that will work with SAA via mqseries. Do you have any experience on this? Also, do you reconciliate with ack/nack's?
thanks