@Lizette, I should have asked "in what environment?" I tend to think in C, but
not everyone does. <g>
fldata() -- search for it if the links do not work -- translates a UNIX FILE
pointer to a dataset name or path. It's a C (or C++) library function.
Again in C, if you have a file descriptor number like the ones for STDIN and so
forth that are passed to a command line program, you can translate one of those
to a name (and FILE pointer) by using the obscurely-documented w_ioctl()
static char stringForPath[FILENAME_MAX+1];
static const int Iocc_GetPathName = 17; // Absolute name @DOA// >From
BPXYIOCC
int rc = w_ioctl(filenum, Iocc_GetPathName, FILENAME_MAX+1, stringForPath);
Alternatively you can get the file number for a FILE pointer with fileno() and
then use w_ioctl() per the above.
Charles
-----Original Message-----
From: IBM Mainframe Discussion List [mailto:[email protected]] On Behalf
Of Paul Gilmartin
Sent: Wednesday, October 27, 2021 5:37 AM
To: [email protected]
Subject: Re: Help with translating a FID Unix FIle
On Tue, 26 Oct 2021 20:29:31 -0700, Charles Mills wrote:
>To translate a UNIX File ID to the file or data set name?
>
>https://www.ibm.com/docs/en/zos/2.3.0?topic=functions-fldata-retrieve-file-i
>nformation ?
>
ITYM:
<https://www.ibm.com/docs/en/zos/2.3.0?topic=functions-fldata-retrieve-file-information>
>-----Original Message-----
>From: Lizette Koehler
>Sent: Tuesday, October 26, 2021 4:52 PM
>
>Is there something I can use to translate the FID to a valid USS Path or
>File Name
>Lizettel
-- gil
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN