z/OS Using REXX and z/OS UNIX System Services
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


f_dupfd2

z/OS Using REXX and z/OS UNIX System Services
SA23-2283-00

Read syntax diagramSkip visual syntax diagram
>>-f_dupfd2--fd--fd2-------------------------------------------><

Function

f_dupf2d invokes the fcntl callable service to duplicate a file descriptor that is equal to fd2.

Parameters

fd
An opened file descriptor (a number) to be duplicated.
fd2
The file descriptor of choice.

Usage notes

If fd2 is already in use, f_dupfd2 closes it. If fd is equal to fd2, fd2 is returned but not closed.

Example

In the following example, assume that fd and fd2 were assigned values earlier in the exec:
"f_dupfd" fd fd2

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014