Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am stuck and need help with using trying to use tjavarow to iterate between rows, that are sorted and stored.
Here is how my flow looks like. I am sorting based on the MSH_10 field, but I keep getting terror that row75Struct cannot be resolved as a variable.
I will be glad for any help
Code for the tjavarow:
// Initialize variables f// Initialize variables for storing the extracted field values
String msh10;
// Iterate through the sorted rows
while (row75 != null) {
// Extract the MSH.10 field value from the current row
msh10 = row75.MSH_10; // Use the exact field name as it appears in your schema
// Print the MSH.10 field value
System.out.println("MSH_10 Value: " + msh10);
// Perform your processing based on the sorted MSH.10 values
// Example: If msh10 meets certain criteria, process the row
// Read the next row
row75 = row75Struct;
}
Hi
row75Struct is not a variable in the generated Java code.
To access the input/output column on tJavaRow, use the expression like this:
output_row.columnName=input_row.columnName;
eg:
output_row.MSH_10=input_row.MSH_10;
During the job execution, you can only access the current row or last N rows, you can't access the next row. What is your requirement?
Regards
Shong