30.06.2013 Views

File Management - IBM

File Management - IBM

File Management - IBM

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Redirecting files<br />

64 <strong>File</strong> <strong>Management</strong> V4R5<br />

v From the merged display of all overrides, you can request the display that is not<br />

merged, as in “Displaying overrides with WRKJOB: scenario” on page 58.<br />

v From the unmerged display of all overrides, you can request the merged display.<br />

v From the merged display of all overrides, you can request a merged detail<br />

display of any override, equivalent to the command in “Displaying merged file<br />

overrides for one file: scenario” on page 58.<br />

v From the merged display of all overrides, you can request a display of all the<br />

individual overrides that contributed to the merged display, showing the level<br />

(call level or job level) for which each was requested.<br />

v From either the display of contributing overrides or the display (not merged) of<br />

all overrides, you can request a detail display of the override for a particular file<br />

at a single call level.<br />

<strong>File</strong> redirection lets you use overrides to direct data input or output to a device of<br />

a different type; for example, to send data that was intended for a diskette to a<br />

printer instead. This use of overrides requires somewhat more foresight than the<br />

override applications listed above, because the program must be able to<br />

accommodate the different characteristics of the two devices involved.<br />

To override to a different type of file, use the override command for the new type<br />

of file. For example, if you are overriding a diskette file with a printer file, use the<br />

Override with Printer <strong>File</strong> (OVRPRTF)command.<br />

This section applies to using an application program only. System code may or<br />

may not support file redirection. Refer to “Effect of overrides on some commands”<br />

on page 35 for rules on how system code processes overrides.<br />

You use the OVRDBF command to redirect a file to a Distributed Data<br />

<strong>Management</strong> (DDM) file. If the remote system is another AS/400 system, all<br />

normal rules discussed in this chapter apply. If the remote system is not an AS/400<br />

system or System/38, then normally you should not specify an expiration date or<br />

end-of-file delay. For more information, refer to the Distributed Data <strong>Management</strong><br />

book.<br />

When you replace the file that is used in a program with another file of the same<br />

type, the new file is processed in the same manner as the original file. If you<br />

redirect a field-level file, or any other file that contains externally described data,<br />

you should usually specify LVLCHK(*NO) or recompile the program. Even when<br />

you turn level checking off, the record formats in the file must remain compatible<br />

with the records in the program. If the formats are not compatible, the results<br />

cannot be predicted.<br />

Overrides that have a TOFILE parameter value other than *FILE remove any<br />

database member specifications that may be on overrides applied at higher call<br />

levels. The member name will default to *FIRST unless it is specified with the<br />

change to the file name or library or on another override at a lower call level.<br />

If you change to a different type of file, the system ignores device-dependent<br />

characteristics and records that the system reads or writes sequentially. You must<br />

specify some device parameters in the new device file or the override. The system<br />

uses defaults for others. The effect of specific redirection combinations is described<br />

later in this section.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!