Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

FILEID function inside PL1

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> PL/I & Assembler
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    Post subject: FILEID function inside PL1
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: 8117
Location: East Dubuque, Illinois, USA

PostPosted: Thu Apr 02, 2009 7:24 am    Post subject:
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    Post subject: Reply to: FILEID function inside PL1
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: 8117
Location: East Dubuque, Illinois, USA

PostPosted: Thu Apr 02, 2009 8:16 am    Post subject:
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    IBMMAINFRAMES.com Support Forums -> PL/I & Assembler All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts What is the Extract Function in JCL dharmaraok JCL & VSAM 3 Wed Jun 14, 2017 9:12 am
This topic is locked: you cannot edit posts or make replies. RANDOM Function in COBOL swapnil781 COBOL Programming 2 Tue Nov 15, 2016 6:17 pm
No new posts Check System time(Minute) Using TIME1... balaji81_k DFSORT/ICETOOL 5 Fri Nov 11, 2016 10:53 am
No new posts Access SQLCA fields inside a stored p... gangapd DB2 6 Thu Oct 27, 2016 10:20 am
No new posts Strange EXEC function call in z/VM Willy Jensen CLIST & REXX 3 Wed Oct 05, 2016 2:07 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us