Handling parallel submitted AS/400 jobs

20 pts.
Tags:
AS/400
AS/400 jobs
I have a requirement to submit an existing job to divide into number of parallel jobs to process a huge number of records in the nightly batch. while execution, these jobs need to access a configuration file almost for every record they process. What is the best way to avoid record locks between parallel submitted jobs while accessing this configuration file? Please advise


Software/Hardware used:
AS400, Iseries , V6R1
1

Answer Wiki

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

I believe You don’t need to update Configuration file for each record you process.

So, You can define the configuration file in Input mode to avoid record locks.
If you have case, where you need to update the configuration file, Use Extender (READ(N)) not to lock the file where ever you don’t need to update.
And, Use Extender ‘E’ (READ(E)) where ever you need the file in update mode and check for error after READ Statement.
Issue DLYJOB Command to wait for few seconds and retry the READ Opeation
            DOW       NOT %EOF(TESTFILE)
// Your Logic
KEY01 READ(E) TESTFILE
            IF %ERROR() 
            DLYJOB //Mention Seconds
            ITER
            ENDIF
// Your Logic
            ENDDO  
Pradeep.

Discuss This Question: 1  Reply

 
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.
  • ToddN2000
    Another option, if you are not updating the configuration file is to use the CHAIN(N). This will chain to the record but not lock it for update.
    135,305 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.

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

Following

Share this item with your network: