Wrong RECFM reported for PDS !

General discussion on the JZOS batch launcher and toolkit
Post Reply
Cogito-Ergo-Sum
Posts: 30
Joined: Thu Jan 25, 2007 8:31 am
Location: Bengaluru, India

Wrong RECFM reported for PDS !

Post by Cogito-Ergo-Sum »

Hi,
I have looked all around and do not seem to be doing anything out of the ordinary.

Code: Select all

String pdsName =  "//'MT.TEST.PDS0'" ;                  
ZFile zf = new ZFile(pdsName, "r");                          
                                                             
System.out.println("dsn        : " + zf.getActualFilename());
System.out.println("dsorg      : " + zf.getDsorg());         
System.out.println("recfm      : " + zf.getRecfm());         
System.out.println("recfm mask : " + zf.getRecfmBits());     
I keep getting

Code: Select all

dsn        : MY.TEST.PDS0
dsorg      : 5                
recfm      : U                
recfm mask : 4                
even though I had allocated the PDS with RECFM=FB.

What's wrong ?
Debugging tip:
When you have eliminated all which is impossible, then whatever remains, however improbable, must be the truth.
--Sherlock Holmes
dovetail
Site Admin
Posts: 2022
Joined: Thu Jul 29, 2004 12:12 pm

Post by dovetail »

Unfortuneatly, this is how the C/C++ library works.... if you open a PDS, it is actually opening the directory which has the attributes that you mention.

If you want to see the "real" attributes:

1) Open a member
2) Use the ZFile.obtainDSN() method to get the label information. (This api so far is only available in the alphaWorks version)
Cogito-Ergo-Sum
Posts: 30
Joined: Thu Jan 25, 2007 8:31 am
Location: Bengaluru, India

Post by Cogito-Ergo-Sum »

I will look into ZFile.obtainDSN(). Thanks.
Debugging tip:
When you have eliminated all which is impossible, then whatever remains, however improbable, must be the truth.
--Sherlock Holmes
Post Reply