Unexpected results in data

145 pts.
Tags:
RPGLE
I work with a TP software product that allows me to pass data back and forth from within that software using my custom program (RPGLE).  I have my custom RPGLE program that reads files in a main software I work with.  My RPGLE program sort of works like an API but it does not set on LR.  I am passing data values to my program and retain them as necessary in that program and send values back to the TP software when necessary.  I can only pass one field into and 1 field back (if necessary) at a time.  (This cannot change.)  Internal work fields are cleared at certain points when necessary.  A main software program is setup to run several times overnight in a single threaded job queue.  Each run extracts different sets of data (the extracts must work this way) into a multimember file.  As part of each of those jobs - after the member is created, the data from the newly created file member is sent to the TP software (which will call my interactively) and a new file member is created in a different file. 

1.  Main software extracts data (based on some parameters) into a file member.

2.  That file member's data is sent to the TP's software to create the final file member.

Here is the problem:

When the jobs are sent to the single threaded job queue, the start of a new job is the same second that the previous job ended.  We are getting unexpected data (not accurate) in some of the final file members.  I check the final files every morning and if I find bad data, I don't have to start with step 2 - I can do step 2 again to call the TP software.  I am not changing anything - just starting with step 2 to recreate the final file member.  This new file is correct and doesn't have the bad data.   

Any idea what is happening?  I have put dump statements in the program to see where it could be getting the data from, but nothing appears to be in the logic.  I clearly see all fields getting cleared when job 2 starts, but at some point it picked up data from my main software's external data.  The keys at no time reference the records where it is getting the data from. 

 

Answer Wiki

Thanks. We'll let you know when a new response is added.

You correctly inserted “program”:

(which will call my <b>program</b> interactively)

The TP (third party) software is a translation software (we use it for X12 transactions). We can send element data to a custom progrm (my RPGLE program), save it in the program, perform any function like any other program, and can return values to the output file from the translation job. I will ask the tech dept if they can journal the file, they may not agree to. Thanks for the suggestion.

Discuss This Question: 5  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • TomLiotta
    (which will call my /program/ interactively) First, that comment doesn't make sense. Yet, you clearly intended to say it; so, it seems like it ought to be important. Since it's almost guaranteed that it's not an "interactive" call, you must have intended to say something else. Can you elaborate, please? Next, are the files journaled? If not, then there may be no good way to track anything down. You won't be able to tell which job was responsible for adding an inaccurate row or updating a row incorrectly. Start journaling on the file and review the resulting journal entries. They should remove most of the guesswork. Tom
    125,585 pointsBadges:
    report
  • TomLiotta
    Although "/program/" may be correct, the problem is with the word "interactively". That's what doesn't make complete sense since this doesn't seem to be related to an interactive aspect of the process. I was hoping to be certain that you mentioned this for a reason that wasn't clear to me. Note that journaling would only be temporary. It would be used while tracking which job was the actual source of inaccurate rows and what the exact timestamps of the file transactions were. That info would give a timeline that should point exactly to the points of problems. Then journaling would be ended and all elements could be deleted. Mostly it would be treated like a temporarily enabled trace log. Tom
    125,585 pointsBadges:
    report
  • Pt0505
    There is a job that is submitted in batch - that is doing the translation of the X12 file. Inside that TP's software - my custom program is being called - as this batch job is running (maybe I am using the wrong terminology?) That job is passing element data to my program - and passing info back into the job - hundreds (if not 1000s) of times during this translations.
    145 pointsBadges:
    report
  • TomLiotta
    my custom program is being called - as this batch job is running My apologies for working past that element, but there are two major categories of problems involving 'batch' that are different from 'interactive'. Parameter lists and library lists tend to lead in very different directions. Now we can say that this is running 'batch' rather than 'interactive' and pay attention to different elements. ("Interactive" refers to the interaction with a person through a direct interface -- a terminal.) Your actual question -- A main software program is setup to run several times overnight in a single threaded job queue. That indicates that multiple (TP) jobs start and end. Each individual job may call your program some number of times. Are you ever expecting info to be held by your program from one TP job to the next? Or will every TPA job expect to work only with its own data elements? If data elements are stored by your program from one TP job to the next, what kind of data store are you putting the data into? Tom
    125,585 pointsBadges:
    report
  • Pt0505
    Are you ever expecting info to be held by your program from one TP job to the next? Or will every TPA job expect to work only with its own data elements? No - every TP job is a new job and should not have any data left over from when the previous job ran. All of the internal fields in the program are being cleared when a new job starts. If data elements are stored by your program from one TP job to the next, what kind of data store are you putting the data into? Most of the fields (2 others are character) in the program that are being used and cleared, are numeric fields. They are initialized to 0 and blanks in the CLEAR subroutine.
    145 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following