How to repeat the same block at Message (Script) Streamserve 5.6.0

Hi,
Need some help here, i'm using stremserve version 5.6.0. I need to do repeating for the same block in message (script) but unable to get the value. Below my scenario. Please help me.

  1. This is content in "Resources"

RECORD "Header4" 1 CHRSEP "|"
MATCH
SCRIPT
{
if (StrrBlk(matchPos(1,1) )= "2" )
{
return 1;
}
}
Event "TransAdvise_StreamIN"
FIELDS
"IND";
"EmailAddress2";
"ID_TypeCode2";
"ID_Number2";
"EmailAddress3";
"ID_TypeCode3";
"ID_Number3";
"EmailAddress4";
"ID_TypeCode4";
"ID_Number4";
"EmailAddress5";
"ID_TypeCode5";
"ID_Number5";
END
END
2. Message (Script) (to get the value from resources)

$EMAIL_ADDRESS_S1=msggetvalue("Header4:1/Header4_EmailAddress2");
$ID_TYPE_CODE1=msggetvalue("Header4:1/Header4_ID_TypeCode2");
$ID_NUMBER1=msggetvalue("Header4:1/Header4_ID_Number2");
$EMAIL_ADDRESS_S2=msggetvalue("Header4:1/Header4_EmailAddress3");
$ID_TYPE_CODE2=msggetvalue("Header4:1/Header4_ID_TypeCode3");
$ID_NUMBER2=msggetvalue("Header4:1/Header4_ID_Number3");
$EMAIL_ADDRESS_S3=msggetvalue("Header4:1/Header4_EmailAddress4");
$ID_TYPE_CODE3=msggetvalue("Header4:1/Header4_ID_TypeCode4");
$ID_NUMBER3=msggetvalue("Header4:1/Header4_ID_Number4");
$EMAIL_ADDRESS_S4=msggetvalue("Header4:1/Header4_EmailAddress5");
$ID_TYPE_CODE4=msggetvalue("Header4:1/Header4_ID_TypeCode5");
$ID_NUMBER4=msggetvalue("Header4:1/Header4_ID_Number5");

  1. Sample Test data i need to generate as per below (.txt):-

1|ADDRESS 1 FOR AA101747|ADDRESS 2 FOR AA101747|ADDRESS 3 FOR AA101747|ADDRESS 4 FOR AA101747|28100|AA101747||R619|29012020|N|N|E|Y||||.000000%||[email protected]|TA|AA101727||
2|[email protected]|TA|AA101747
2|[email protected] |TA|AA101748
2|[email protected]|TA|AA101749
2|[email protected]|TA|AA101750

Refer to this test data, i only can retrieve first block with email address "test1", the remaining email "aminah", "abunafi" and "noralifah" not able to retrieve the value.
How do i do repeating to retrieve the remaining 3 more email with the the same indicator "2".

Sign In or Register to comment.