1,150 pts.
 File maintenance
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

Software/Hardware used:
ASKED: January 23, 2009  3:33 PM
UPDATED: February 4, 2009  12:40 PM

Answer Wiki:
Hi, 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. Regards, Martin Gilbert.
Last Wiki Answer Submitted:  February 2, 2009  5:11 pm  by  Gilly400   23,625 pts.
All Answer Wiki Contributors:  Gilly400   23,625 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

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

 44,180 pts.

 

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

 44,180 pts.

 

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

 830 pts.

 

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 pts.