Invalid File Parameters....

General discussion on the JZOS batch launcher and toolkit
Post Reply
steveo
Posts: 6
Joined: Mon Jun 13, 2005 2:15 pm

Invalid File Parameters....

Post by steveo »

Running JZOS 1.2.1 on z/OS 1.6 with Java 1.4.2. Running the following JCL, and get the following error:

Code: Select all

The following error occurred --->>                                              
ZFileException: //DD:XML: fopen failed - EDC5057I The open mode string was invalid. ERRNO=57 ERRNO2=0x53b006c LAST_OP=151 ABEND_CODE
=0x562 ABEND_RC=98                                                              
                                                                                
******************************** BOTTOM OF DATA ********************************
JCL:

Code: Select all

//JAVAJVM  EXEC EXJZOSVM,                                              
//   LOGLVL='+I',                                                                              
//   JAVACLS='XMLParseValidate -v=never -n'                            
//XML      DD DSN=FST.ACP1.CSMX629A.REXXML.PRODMAYX,DISP=SHR           
//SCHEMA   DD DSN=FST.BIC.SCHEMA,DISP=SHR                              
//SYSPRINT DD SYSOUT=*          < System stdout                        
//SYSOUT   DD SYSOUT=*          < System stderr                        
//STDOUT   DD SYSOUT=*          < Java System.out                      
//STDERR   DD SYSOUT=*          < Java System.err                      
//STDENV DD *                                                          
export JAVA_HOME=/usr/lpp/java/javats23/                               
export JZOS_HOME="/apps/jzos/"                                         
export XML_Root="/usr/lpp/ixm/IBM/xml4j-4_2"                           
LIBPATH=/lib:/usr/lib:"${JAVA_HOME}"/bin                               
LIBPATH="$LIBPATH":"${JAVA_HOME}"/bin/classic                          
LIBPATH="$LIBPATH":"${JZOS_HOME}"                                      
LIBPATH="$LIBPATH":"${XML_Root}"                                       
export LIBPATH="$LIBPATH"                                              
export PATH=.:/bin:/usr/sbin:/usr/etc:/usr:/usr/lpp/java/J1.4/bin:$PATH
export WAS_Root=apps/websphere/was51/usr/lpp/zWebSphere/V5R1M0         
CLASSPATH="${JZOS_HOME}"/jzos.jar                                      
CLASSPATH="$CLASSPATH":/usr/lpp/java/J1.4/bin                          
CLASSPATH="$CLASSPATH":/usr/lpp/java/J1.4/bin/classic                  
CLASSPATH="$CLASSPATH":$XML_Root/:/u/a056748                           
export CLASSPATH="$CLASSPATH"                                          
/*                                                                     
//                                                                     
Here's the code snippet from the Java app being executed:

Code: Select all

ZFile filename = new ZFile("//DD:XML", "rt,type=record");
ZFile schemaSource = new ZFile("//DD:SCHEMA", "rt,type=record"); 
Here's JZOS +I output info

Code: Select all

JZOSVM14(N): log level has been set to: I                                       
JZOSVM14(N): Copyright (C) 2004 Dovetailed Technologies LLC. All rights reserved
JZOSVM14(N): JZOS Version 1.2.1                                                 
JZOSVM14(I): Region requested = 0K, Actual below/above limit = 8M / 1346M       
JZOSVM14(I): PATH=.:/bin:/usr/sbin:/usr/etc:/usr:/usr/lpp/java/J1.4/bin:/bin:.  
JZOSVM14(I): JZOS_HOME=/apps/jzos/                                              
JZOSVM14(I): _=/bin/env                                                         
JZOSVM14(I): CLASSPATH=/apps/jzos//jzos.jar:/usr/lpp/java/J1.4/bin:/usr/lpp/java
-4_2/:/u/a056748                                                                
JZOSVM14(I): WAS_Root=apps/websphere/was51/usr/lpp/zWebSphere/V5R1M0            
JZOSVM14(I): LIBPATH=/lib:/usr/lib:/usr/lpp/java/javats23//bin:/usr/lpp/java/jav
ixm/IBM/xml4j-4_2                                                               
JZOSVM14(I): XML_Root=/usr/lpp/ixm/IBM/xml4j-4_2                                
JZOSVM14(I): JAVA_HOME=/usr/lpp/java/javats23/                                  
JZOSVM14(N): Java Virtual Machine created.  Version information follows:        
java version "1.4.2"                                                            
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2)                  
Classic VM (build 1.4.2, J2RE 1.4.2 IBM z/OS Persistent Reusable VM build cm142-
JZOSVM14(I): Using output encoding: 'IBM-1047'                                  
JZOSVM14(I): MVS commands are ENABLED                                           
JZOSVM14(I): Java main class: XMLParseValidate                                  
JZOSVM14(I): Arg 1='-v=never'                                                   
JZOSVM14(I): Arg 2='-n'                                                         
JZOSVM14(N): Invoking XMLParseValidate.main()                                   
JZOSVM - JVM completed with exit(16).                                           
******************************** BOTTOM OF DATA ********************************
Does anyone have any suggestions as to how to move forward on this ??
Thanks
Steve
mwilliam
Posts: 37
Joined: Mon Oct 11, 2004 3:21 pm

Post by mwilliam »

I believe the issue lies in the fact that “rt” and “type=record” are mutually exclusive.

The open mode of “rt” refers to open the file for read-only in “text (character stream)” mode, while “type=record” means to access data one record (native to MVS) at a time.

I recommend, either of the following open modes:
“rt” //open in text mode, for reading one (logical) character at a time.
“rb,type=record” //open for binary, fetch record at a time
steveo
Posts: 6
Joined: Mon Jun 13, 2005 2:15 pm

Post by steveo »

That appeared to do the trick !! Typos will get you every time..
Thanks
Steve
Post Reply