Skip to content

L3-Workshop-Execution-Test-Online-User features-Transaction report(INCLUDE COND not working)

0

After doing multiple tests by using different conditions(LE,GE,EQ etc) I have found that the INCLUDE COND in TRANREPT Job {INCLUDE COND=(305,10,CH,GE,C'${startDate}',AND, 305,10,CH,LE,C'${endDate}')} is not working and failing to identify the characters. I also checked the positions of chars in the file as well using HxD, all are good. But still I am getting 0 records in datasets. If I use only SORT FIELDS=(263,16,CH,A) it gives the whole data correctly but without applying the condition of dates. Note: I have used CH instead of ZD because it was also not working for me. Here I tested the first char which is 0 using INCLUDE COND. Enter image description here This the file using for sorting, it has the data, but include is not understanding and giving empty records. Enter image description here We can see the two files are empty Enter image description here Then I tried with commenting out include and keeping only sort. Enter image description here This time it worked and am able to see results in console Enter image description here Also able to see records as well. Enter image description here

Has anyone else faced this issue? Please respond how did you solved this? Since this is a monthly report, how can we produce monthly data if the INCLUDE COND is not working? Is the jcl reading a junk value while processing? Is there any alternate ways to give the condition?

  • I also removed the condition and used CH instead of ZD. I am good at the manual test. All batch scripts are working during the manual test. When I moved to automated testing, I encountered a deserialization exception when the auto-test script was uploading data. I guess there is a character set issue, which I don't know how to bypass during the autotest yet.

  • I am also facing the same issue. Any one recently resolved the same?

  • Same issue here, still no solution?

asked 2 years ago333 views

2 Answers
1
Accepted Answer

Hi everyone, I have completed the workshop and got certified as well. For this issue the only solution is to commenting out include condition and keeping only sort, also using CH instead of ZD. After doing this I have moved on to next steps didn't caused any issue regarding this.

answered 2 years ago

0

The issue you're experiencing with the INCLUDE COND in the TRANREPT job is likely related to how the date fields are being interpreted or compared. Here are a few suggestions to troubleshoot and potentially resolve the problem:

  1. Date format: Ensure that the date format in your input file matches exactly with how you're specifying it in the INCLUDE COND. If the dates in the file are in a different format than expected, the comparison will fail.

  2. Character vs. Zoned Decimal: You mentioned switching from ZD (zoned decimal) to CH (character). While this can work, it's important to ensure that the date fields are indeed in character format. If they're actually in a numeric format, using CH might lead to unexpected results.

  3. Field positioning: Double-check that the start position (305) is correct for the date field. Even a small offset can cause the condition to fail.

  4. Date range: Verify that the ${startDate} and ${endDate} variables are being properly populated with values that exist within your dataset.

  5. Alternative approach: If the INCLUDE COND continues to fail, you might consider using a two-step process:

    • First, sort the data as you've done successfully.
    • Then, use a separate step (like a simple program or script) to filter the sorted data based on the date range.
  6. Debugging: Add debug statements or logging in your Groovy script to print out the actual values of ${startDate} and ${endDate} to ensure they're what you expect.

  7. Data examination: Use a hex editor or similar tool to examine the exact contents of the date fields in your input file. This can help identify any unexpected characters or formatting issues.

  8. Alternate condition: Try using a simpler condition first (e.g., checking for equality with a single known date) to isolate whether the issue is with the range comparison or the field interpretation.

If none of these approaches resolve the issue, you might need to consider if there's a problem with how the SORT utility is being invoked or if there are any environment-specific issues affecting the execution of the INCLUDE COND.
Sources
AWS BluAge L3 Workshop - Execution - Test - Batch - COMBTRAN - Issue | AWS re:Post
BluAge L3 Workshop Missing Property Exception: programResults when creating transaction report | AWS re:Post

answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.