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

Dig Deeper on RPG iSeries programming

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.

Please create a username to comment.

-ADS BY GOOGLE

SearchDataCenter

  • How do I size a UPS unit?

    Your data center UPS sizing needs are dependent on a variety of factors. Develop configurations and determine the estimated UPS ...

  • How to enhance FTP server security

    If you still use FTP servers in your organization, use IP address whitelists, login restrictions and data encryption -- and just ...

  • 3 ways to approach cloud bursting

    With different cloud bursting techniques and tools from Amazon, Zerto, VMware and Oracle, admins can bolster cloud connections ...

Close