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

JRIO not acessing DDNAMES


IBM Mainframe Forums -> All Other Mainframe Topics
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
HenriqueS

New User


Joined: 17 Feb 2007
Posts: 30
Location: Brazil

PostPosted: Tue Mar 24, 2009 8:15 pm
Reply with quote

Folks,

I am being able to read a sequential file with JRIO*, but I am not being able to access a DDNAME that points to a SYSYIN-like stream or to a file (DSN). See my code below...

When I run the job, it goes straight to EOF...why is this happening?

JCL

Code:

//BPXBATCH EXEC PGM=BPXBATSL,REGION=0M,                 
//             PARM='SH java -cp .:/tmp DDName DD:TEST'
//TEST  DD *
 TEST 1                                             
 TEST 2                                             
 TEST 3                                             
 TEST 4                                             
 TEST 5                                             
/*


Java

Code:

import com.ibm.recordio.*;                     
import java.io.*;                             
                                               
public class DDName implements IConstants{     
public static void main(String args  ){       
    DDName ddn = new DDName();                 
    ddn.readSYSIN("TEST"); //trying to read a DDNAME called TEST                   
}                                             
 public void readSYSIN(String DDNAME){                             
         try{                                                       
             System.out.println("try{");                           
             IFileInputRecordStream first =                         
                new FileInputRecordStream("//DD:" + DDNAME);       
             byte   buffer = new byte JRIO_MAX_RECORD_LENGTH ;     
             for(;;){                                               
                 int bytesRead = first.read(buffer);               
                 if (bytesRead != JRIO_READ_EOF){                   
                     System.out.println(new String(buffer));       
                 }else{                                             
                     System.out.println("EOF");                     
                     break;                                         
                 }                                                 
             }                       
             first.close();         
         }catch(Exception e){       
             e.printStackTrace();   
         }                           
     }                               
}


* I have no JZOS installed on my LPAR and there is some bureaucracy putting it up...
Back to top
View user's profile Send private message
HenriqueS

New User


Joined: 17 Feb 2007
Posts: 30
Location: Brazil

PostPosted: Wed Mar 25, 2009 12:50 am
Reply with quote

Some extra info from runtime. Seems the file is found by the API, but no data is retrieved at all.

Code:

exists()? true                     
canRead()? true                   
canWrite()? true                   
getRecordFormat()? FB             
getRecordLength()? 80             
length()? -1                       
getCanonicalPath()? //DD:TEST   


According to the JRIO API, length returns 0 if a file is not found...
Back to top
View user's profile Send private message
HenriqueS

New User


Joined: 17 Feb 2007
Posts: 30
Location: Brazil

PostPosted: Fri Mar 27, 2009 11:01 pm
Reply with quote

Folks, according to IBM support, there is a bug on the Java Record IO lib, not allowing to access DDNAMES. This affects JDK 1.4, 1.5 and 1.6. There is already an open PMR and APAR specific to JDK 1.4. Soon I will post more details.

PMR: 71125,072,649
APAR: PK82291 - JAVA142 SR12 PROBLEM READING DD/PARMS
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Fri Mar 27, 2009 11:51 pm
Reply with quote

Thank you for the info icon_smile.gif

d
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 -> All Other Mainframe Topics

 


Similar Topics
Topic Forum Replies
No new posts How to free (unalloc) data sets and d... TSO/ISPF 4
No new posts IDCAMS & LISTCAT with ddnames JCL & VSAM 1
No new posts ACESSING THE FILE NAME FROM ANOTEHR E... All Other Mainframe Topics 2
No new posts Alternate DDNAMEs for SORTIN, SORTOUT... DFSORT/ICETOOL 12
No new posts How to use other DDNAMES for SORTIN? SYNCSORT 6
Search our Forums:

Back to Top