Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
One common task is having to create a work file in QTEMP that has an external file definition. In cases like that, the simplest approach is to create the work file in the same library where you have created the programs that use the file, and then create a duplicate of the file in QTEMP using the CRTDUPOBJ command.
CRTWRKF simplifies the duplication task by requiring only the name of the “model” work file. Even the library name defaults to *LIBL, allowing you to avoid hard-coding library names or going through gyrations to obtain it without hard-coding. CRTWRKF always creates the file in QTEMP, using the same name of the model.