IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

FILEID function inside PL1


IBM Mainframe Forums -> PL/I & Assembler
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Nirav721

New User


Joined: 11 Feb 2008
Posts: 53
Location: NJ

PostPosted: Thu Apr 02, 2009 5:16 am
Reply with quote

Anyone know how this is used? I thought it would return the address of the DCB of the file I am querying, but instead, my put skip shows a character number, not an address?

the way I used this was as follows:

FILE@ID FIXED BIN (31),

FILE@ID = FILEID(INFILE);

PUT SKIP LIST('FILE@ID = ',FILE@ID);

I was expecting to see an address of the DCB?

Any help or enlightenment would be great!!

Thanks
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Thu Apr 02, 2009 7:24 am
Reply with quote

What do you call a character number? An address of the DCB would be a 4-byte hexadecimal value that will be displayed as a number since it's FIXED DEC. What did you expect to see?

From the PL/I Language Reference (link at the top of the page):
Quote:
19.71 FILEID

FILEID returns a FIXED BIN(31) value that is the system token for a PL/I file constant or variable.
You may find this by reading the manual:
Quote:
19.70 FILEDDWORD

FILEDDWORD returns a character string that is the value of the attribute c for file x.

Click here to display pages in Accessible mode


________________________________________________________________________
| |
| >>__FILEDDWORD(x,c)_________________________________________________>< |
| |
|________________________________________________________________________|

x File reference.

c Character string that holds the attribute to be queried.

When using FILEDDWORD, the following are valid options for c:


access putpage amthd recfm action share charset type filename typef organization

These options return the following values:

* ACCESS returns SEQUENTIAL or DIRECT.
* ACTION returns INPUT, OUTPUT, or UPDATE.
* AMTHD returns VSAM KSDS, VSAM ESDS or VSAM RRDS on the z/OS platform and FILESYS, DDM, BTRIEVE or ISAM on the Windows or AIX platforms.
* CHARSET returns ASCII or EBCDIC.
* On the z/OS platform, FILENAME returns the fully qualified path name for HFS files and the MVS dataset name for all other files except it returns the value 'NULLFILE' for files specified with either DSN=NULLFILE and DD DUMMY. For a MVS dataset that is a member of a PDS or PDSE, the name returned includes the member name. On the Windows and AIX platforms, it returns the fully qualified path name of the file .
* ORGANIZATION returns CONSECUTIVE, RELATIVE, REGIONAL(1) or INDEXED.
* RECFM returns the appropriate record format setting for the file, and U for VSAM files. This option is only valid on z/OS.
* SHARE returns NONE, READ or ALL.
* TYPE returns RECORD or STREAM.
* TYPEF returns the type of the native file.
Back to top
View user's profile Send private message
Nirav721

New User


Joined: 11 Feb 2008
Posts: 53
Location: NJ

PostPosted: Thu Apr 02, 2009 7:44 am
Reply with quote

Hi..thanks for the reply.

The reason why I am questioning this is because the number that it points to (hex equivalent of the character number I see) has zeroes, and no information about a DCB! Any ideas?
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Thu Apr 02, 2009 8:16 am
Reply with quote

The value is going to be an address; you have to reference memory locations from that address to see the DCB values.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> PL/I & Assembler

 


Similar Topics
Topic Forum Replies
No new posts Calling an Open C library function in... CICS 1
No new posts DATE2 function SYNCSORT 15
No new posts Help on PL/I jsonPutValue function PL/I & Assembler 8
No new posts how to use Tso outtrap external function All Other Mainframe Topics 8
No new posts INSYNC option with same function as I... JCL & VSAM 0
Search our Forums:

Back to Top