AS/400 Job Ended Abnormally and Message wait job

370 pts.
Tags:
AS/400
AS/400 jobs
AS/400 Locking
Hi Guys,

 

If a job ended abnormally updating 20 files and not updating 10 files. What to do to update remaining 10 files?. How we need to take action considering there is no commitment control?.

 

And also if a job is in message wait because of record lock and if we are in a situation, where we can not release the lock, what to do?.



Software/Hardware used:
AS/400

Answer Wiki

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

Hi,

U should analyze the program, & get till what line the program has happened, & this can be done by checking the files..

After that from that point alone, u can excecute the program.

Or, u have to retrive all the files from the Journal & restore back(RMVJRN) & again see thur that their is no lock & execute the program.

Discuss This Question: 7  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
    Were you at least journalling the files? Tom
    125,585 pointsBadges:
    report
  • TomLiotta
    if a job is in message wait because of record lock and if we are in a situation, where we can not release the lock, what to do? If you truly can't release the lock and the message is from the RPG default error handler, then you only have two choices -- (1) wait until the lock is eventually released so you can attempt a 'R'etry for the message or (2) respond to the message with 'C'ancel or 'D'ump, whichever is most useful to you. The conditions in your question don't allow any other choices. Note that these should have been two separate questions. Because they cover two different areas, future searches should be able to find one question or the other. Tom
    125,585 pointsBadges:
    report
  • Alicsc
    Thanks Tom, I will keep in mind. (1) We are journalling only master data files. If we journal all files we can do backward recovery but in this case if files are not journalled, is there any way to resolve this issue?. (2) I just want to know your approach of action, if conditions are not there. Please
    370 pointsBadges:
    report
  • TomLiotta
    ...in this case if files are not journalled, is there any way to resolve this issue?. Sure. Restore the files and run the process over. Otherwise, manually remove the transactions from the 20 updated files and run the transaction over. (Of course, you can also create a procedure in place of "manual" processes.) Or manually apply the necessary updates to the 10 remaining files. If you don't use the built-in facilities for transaction control, you have to do it the hard way. ...if conditions are not there. Well, if the condition isn't there and the lock can be released, then release it and 'R'etry the transaction. Releasing the lock would mean to go to the job that holds the lock and make it release the lock. That might mean pressing {Enter} on the keyboard to continue, or F12/F3 to cancel/exit, or whatever that application expects to be done (which we have no idea about because we don't know how it's programmed), or responding to a message that the job is waiting on, or ending (cancelling) the job and possibly other things. It depends on the programming and the reason for the lock. I'm not clear on what the question is actually about. It is an open-ended question that needs focus. What is the problem that needs to be solved? Simple scenario... Use three PCs that can all access the same shared directory. Create a .TXT file in the directory, and then go to each of the three PCs and open the file in Notepad. After the file is open three times, go to the first PC and type "PC #1" and close the file and save it. Then go to the next PC and type "PC #2" and close the file and save it. What has happened on the third PC? If you type "PC #3" and close and save the file, what is the result? What happened to the output from the first two PCs? What error messages showed up? In a database system where transactions are critical to the functioning of a business, not to mention legal consequences, it simply cannot be allowed to have output just disappear without a chance even to see that it was there. The database system must protect the data. You can't simply cause locks to go away because they're inconvenient. You have to detect them and handle them. That's a major part of business programming. When you issue an input or output statement, you check the status. When a status code indicates a problem, you call the routine that you wrote to handle that problem. The OS and DB2 and RPG will provide essentially everything you need to know. It's up to you to code the instructions to handle it. Maybe you send a message to the user and ask how to proceed. Maybe you wait 30 seconds and loop back to try it again. Maybe you write the data to a log file and skip to the next transaction. Maybe you flag the transaction and come back to try it later after processing others in the batch. Each business is different. Interactive is different from batch. Some transactions might even be disposable. Nobody outside can tell you what needs to be done. But lots of people can help you do things if you can say what you want to accomplish. Tell us what the business problem is. Describe the circumstances. What's the environment? Who's running into a problem? How is the problem handled today? What should be different? Tom
    125,585 pointsBadges:
    report
  • Alicsc
    Thanks Tom, Tom/Hari, for executing from that point alone, we have to modify the program in our library and we need to compile it in QTEMP. Correct?.
    370 pointsBadges:
    report
  • TomLiotta
    for executing from that point alone, we have to modify the program in our library and we need to compile it in QTEMP. Correct? First, I probably wouldn't compile into QTEMP. I would compile into a new library that I created for this problem. QTEMP would cause your new program to disappear if your job was interrupted and ended any time after the compile for any reason. You would have to recompile exactly the same each time. Actually, I might even restore versions of the 20 files into this new library. Those would be versions from before the updates were applied. You would then have a copy of the 20 files without the updates, a copy of the 20 with the updates, and a copy of the 10 files without the updates. You might then be able to have this new library in your library list above the production library and run your original program in its normal way. Unfortunately, I don't know anything about how your programming is code. It might not even be possible to manipulate which files are updated by controlling the library list. In any case, I would compile in a library that is dedicated to this problem. It can always be deleted when you are done with it. Tom
    125,585 pointsBadges:
    report
  • Yorkshireman
    And, if you are able to fix this, redesign the function and make it robust and recoverable which will probably involve commitment control at least.
    5,580 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