Wow, I am not sure there is a generic answer. I hope I am wrong.

A FID in my understanding is kind of like a DD name -- it is only meaningful in 
the context of a particular invocation of a program. "What file is FID 123?" is 
like asking "what data set is SYSUT1?" At a given moment in a given program the 
question is meaningful, but not necessarily in the context of looking at 
yesterday's console logs. 

I could be wrong. As I say, I hope I am wrong.

Charles


-----Original Message-----
From: IBM Mainframe Discussion List [mailto:[email protected]] On Behalf 
Of Lizette Koehler
Sent: Wednesday, October 27, 2021 12:28 PM
To: [email protected]
Subject: Re: Help with translating a FID Unix FIle

I am getting the FID out of an ICH408I messages

I need to know what file/path/filesystem that access is denied. 

I think there is a tool in TOOLS and TIPS on the ibm website.  But it seems the 
more they try to make navigation easier - it is just more difficult


lizette

-----Original Message-----
From: IBM Mainframe Discussion List <[email protected]> On Behalf Of 
Charles Mills
Sent: Wednesday, October 27, 2021 6:31 AM
To: [email protected]
Subject: Re: Help with translating a FID Unix FIle

@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-f
>ile-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

----------------------------------------------------------------------
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

Reply via email to