cancel
Showing results for 
Search instead for 
Did you mean: 

Passing a variable to output message on NonStop

smitty3501
05 Base Camper

Passing a variable to output message on NonStop

Trying to assign then pass a variable when I generate an alert.  

 

NUMERIC mt10r50pos[0] := 0

 

IF @B24POS.RESPCODE = "050"
SET mt10r50pos := @b24pos.trancnt

END_IF

                            had my base24 tester   send 1 decline  so it would trrigger the below

IF mt10r50pos > 0
SET pMsg := "MasterCard [9810] POS TRANCODE 10 [Normal purchase]:"
SET aMsg := "DECLINE CODE 050 Value of @mt10r50pos@ EXCEEDS THRESHOLD OF 0"
SET crit := "Critical Event:"
LOG EMS 0301 PRIORITY CRITICAL EVENTNUMBER 6099 COLLECTOR $CPRG IMMEDIATELY

 

                      here is output from collector .  I should have said "1"  for this test and not @MT10R50POS@@

10:47:00 06MAR23 062,02,2096 B24POS: CRITICAL EVENT:
MASTERCARD [9810] POS TRANCODE 10 [NORMAL PURCHASE]:
DECLINE CODE 050 VALUE OF @MT10R50POS@@ EXCEEDS THRESHOLD OF 0

 

thanks 

Tags (1)
1 ACCEPTED SOLUTION

Accepted Solutions
Leon_Arens_FNNI
09 Summiteer

Re: Passing a variable to output message on NonStop

When you want Variables inserted into a string you need to use the SUBST command.

Try changing

 

SET aMsg := "DECLINE CODE 050 Value of @mt10r50pos@ EXCEEDS THRESHOLD OF 0"

 

to 

 

SET aMsg := Subst ("DECLINE CODE 050 Value of @mt10r50pos@ EXCEEDS THRESHOLD OF 0")

View solution in original post

3 REPLIES 3
Leon_Arens_FNNI
09 Summiteer

Re: Passing a variable to output message on NonStop

When you want Variables inserted into a string you need to use the SUBST command.

Try changing

 

SET aMsg := "DECLINE CODE 050 Value of @mt10r50pos@ EXCEEDS THRESHOLD OF 0"

 

to 

 

SET aMsg := Subst ("DECLINE CODE 050 Value of @mt10r50pos@ EXCEEDS THRESHOLD OF 0")

Scott_Clement
Expert

Re: Passing a variable to output message on NonStop

Just to add to Leon's response, if you're after more information on the SET function, you can find additional details on this page in the product guide!

smitty3501
05 Base Camper

Re: Passing a variable to output message on NonStop

thanks

Webinar: Keep the modern workforce connected

Unified Communications has always been an important part of companies' digital transformation efforts due to its ability to enable rich virtual collaboration and communication. But with COVID-19, we've reached a break-through point.

Join Bill Haskins, Sr. Analyst & Partner, Unified Communications at Wainhouse Research, and John Ruthven, CEO at IR discuss UC challenges companies are experiencing due to the COVOID-19 crisis.

Join webinar
Top Liked Members