Got an email telling me that only one chart was being selected in the TX2 file this month instead of all the charts.  Investigating I found that chart B was the only one showing up which is the first chart selected.  The other files produced had all the chart data just not the TX2 file.  No code had been changed since the month before when it worked correctly.  OWAG did however have an oracle upgrade since then.  The log said all the charts were being processed.


I put in some debug statements to try and get a handle on what was going on.  At first I thought maybe the cursor wasn’t closing anymore between charts.  The code used a report call to get the charts and then  another report call inside the first one to do the select_meta_data cursor and the select_hier_data cursor.  I actually commented out several processes so I could focus on the TX2 piece and limited the charts to E and F.  Turns out it was fetching all the rows for the first chart selected but then only fetching one row for each chart that followed.  It would fetch the one row and then exit the inner report call without even printing the record

I tried opening a differently named cursor for each chart but that didn’t seem to make a difference.  I tried closing the cursor before opening it and that didn’t help. Finally I rewrote the logic from using a report call inside a report call to having a direct procedure call inside the first report call.  That took care of it but I’m still not sure why it broke.


Print Friendly, PDF & Email

About wendlerb

I didn't drown.
This entry was posted in Aggregate. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *