File maintenance

1150 pts.
AS/400 performance
Hi, I have a file with million records and a batch program scheduled in the night maintains it. But it's found that the program is taking too much time for it's completion.How can we control and complete the program execution within one hour programmatically? thanks

Answer Wiki

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


Can you tell us a bit more about what processing the program is doing? It sounds very slow.

I guess what you mean is to make sure that the program stops after an hour of processing?

You could use a *DTAARA or a database file, which you check occasionally in the program to see whether the program should now stop. At the same time as your program starts, submit another job with a DLYJOB of 60 minutes, which after the 60 minutes will change the *DTAARA or database file to indicate that your program should stop.

Hope this helps. It’s not a marvellous solution.


Martin Gilbert.

Discuss This Question: 4  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.
  • philpl1jb
    This is a tough request -- especially since we know so little about what you're doing. 1. What type of program - RPGLE - Read ... or SQL or ??? 2. What does it do to maintain the file - delete/change ??? 3. How many logicals are there on this file??? 4. Must all records be maintained in a 1 hour period or can some be done each night? Phil
    54,090 pointsBadges:
  • philpl1jb
    Ending the journaling will speed it up. Removing unnecessary logical files. Changing logical files to *RBLD or *DELAY for logicals only used occasionally on reports. Access Path size should be *MAX4GB Phil
    54,090 pointsBadges:
  • LBurkett99
    Consider removing the K from the Record Address Type field of the F-spec. This will result in blocked I/O and require fewer physical reads & writes. Leo Burkett
    850 pointsBadges:
  • Sloopy
    If your program is referencing other files (for example, exchange rates, country codes), load the data from the smaller files into arrays in the program during initialisation. Then your program can retrieve the information from the arrays during execution, and will not have to read the records from the disk every time. I have sample code, if this is relevant to you. Regards, Sloopy
    2,195 pointsBadges:

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.


Share this item with your network: