Q
Problem solve Get help with specific problems with your technologies, process and projects.

CLRPFM and DLTF APIs

CLRPFM and DLTF APIs

Are there any APIs that delete files and clear members? I need to delete and clear a large number of files on a regular basis and was wondering if there were APIs that I could use in the interest of performance.
There are no API's that you can use to improve performance for clearing physical files. You can, however, improve performance by changing the job's wait time for locks, checking to see if there is a lock on an object prior to deleting or clearing it. A simple CL should help with a few twists. I currently read my entries from a file in CL and attempt to allocate the object. ... code not shown
RCVF:
... code not shown
IF COND(&CLRMBRFLG *EQ 'Y') THEN(DO)
ALCOBJ OBJ((&LIB/&FILE *FILE *EXCL &MBR)) WAIT(1)
MONMSG CPF0000 EXEC(DO)
SNDPGMMSG MSGID(CPF9898) MSGF(QCPFMSG)
MSGDTA('Cannot allocate file: ' *TCAT &LIB *CAT '/' *CAT &FILE *TCAT ' for clearing')
TOPGMQ(*PRV)
GOTO CMDLBL(RCVF)
ENDDO
CLRPFM FILE(&LIB/&FILE) MBR(&MBR)
GOTO CMDLBL(RCVF)
ENDDO

==================================
MORE INFORMATION ON THIS TOPIC
==================================

The Best Web Links: tips, tutorials and more.

Ask your programming questions--or help out your peers by answering them--in our live discussion forums.

Ask the Experts yourself: Our application development gurus are waiting to answer your programming questions.


This was last published in September 2004

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

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

Please create a username to comment.

-ADS BY GOOGLE

SearchDataCenter

Close