Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
JRIO not acessing DDNAMES

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> All Other Mainframe Topics
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    Post subject: JRIO not acessing DDNAMES
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    Post subject: Reply to: JRIO not acessing DDNAMES
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    Post subject:
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

Site Director


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

PostPosted: Fri Mar 27, 2009 11:51 pm    Post subject: Reply to: JRIO not acessing DDNAMES
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    IBMMAINFRAMES.com Support Forums -> All Other Mainframe Topics All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Alternate DDNAMEs for SORTIN, SORTOUT... Steve Coalbran DFSORT/ICETOOL 12 Fri Oct 18, 2013 12:24 pm
No new posts How to use other DDNAMES for SORTIN? senthilmurugan SYNCSORT 6 Fri Apr 26, 2013 12:12 pm
No new posts S322 Abend while acessing a KSDS file. PeterHolland PL/I & Assembler 10 Mon Aug 13, 2012 11:52 am
No new posts Input and output filenames in the SYS... DKartiya JCL & VSAM 16 Tue Feb 24, 2009 9:33 am
No new posts Natural to C acessing the TWA dbzTHEdinosauer Java & MQSeries 8 Wed Aug 15, 2007 3:03 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us