This discussion is archived
1 Reply Latest reply: Jul 30, 2013 7:44 AM by Nick Gorman RSS

Tool Pallete -> Advanced -> Message Handling Script/Script

User378604 Newbie
Currently Being Moderated

We have few clarifications in OEDQ.

 

Tool Pallete -> Advanced -> Message Handling Script/Script:

 

we can write Java Script to define processing logic that acts across all the records in a message, or that acts selectively on only the first record in the message.

 

I tried writing Java Script for Data Validation and to display the message.

 

Java Code:

Public static void main(String[] args)

{

int EMPNO;

if(EMPNO = "123456")

{

system.out.println("Invalid EMPNO");

}

else

{

system.out.println("Valid EMPNO");

}

}

When we try to run the processor, We are getting the below error.

 

"error during process preparation

error in script: Error compiling Script: Missing ; before statement"

 

We are not getting error when we try to write a C program for the Message Handling Script.

 

C program:

 

var res=' '

var res1=' '

var res2=' '

if(input1=='US'){

res='Valid Country Code';

output1=res;

}

else if (input1=='UK')

{

res1='Valid Country Code';

output1=res1;

}

else

{

res2='InValid Country Code';

output1=res2;

}

 

Could you please let us know whether Java code can be used in Message handling script and can we have the header "Public static void main(String[] args)" in the script.

 

Thanks for your time.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points