Hola: Creo que te falta el nombre de la biblioteca donde quieres crear el espacio de usuario.
La API QUSCRTUS te indica que el primer par�metro debe ser el nombre calificado del espacio de usuario a crear, es decir, los primeros 10 caracteres deben contener el nombre del espacio y los 10 siguientes la biblioteca. Ser�a algo as�: String nameSpace = "SPLFILES BIBLIOTECA"; http://publib.boulder.ibm.com/iseries/v5r2/ic2924/index.htm?info/apis/quscrtus.htm Lo que me resulta curioso es c�mo quieres obtener la lista de archivos de spool, cuando el toolbox incluye clases espec�ficas para ello y te da la mayor�a del trabajo hecho. Salu2 On Mon, 14 Mar 2005 11:35:23 +0100, Fran Mart�n <[EMAIL PROTECTED]> wrote: > > > Estimado foro, > > Estoy ejecutando desde java y a traves de la Jtopen400 un programa > que pretende obtener desde java emular el comando WRKSPLF *USER. Este > programa lo que realiza es la ejecucion de dos APIs en el AS400 la primera > API lo que hace es crear en una biblioteca de mi AS400 un UserSpace, > QUSCRTUS(funciona perfectamente) y la segunda lo que realiza es la > simulacion de wrksplf y almacena el resultado en el UserSpace anteriormente > creado QUSLSPLP no funcoina, me salta una excepcion diciendome que no > encuentra la biblioteca. > > Alguien podria echarme una mano. Muchas gracias y un saludo. > > > > > A continuacion adjunto el trozo de codigo en java: > > > private void execute(){ > > > > AS400 system = new AS400("S652BA0F","FRAN","FRAN"); > > int ccsid = 280; > > > > AS400Text text1Type = new AS400Text(1, ccsid, system); > > AS400Text text8Type = new AS400Text(10, ccsid, system); > > AS400Text text10Type = new AS400Text(10, ccsid, system); > > AS400Text text20Type = new AS400Text(20, ccsid, system); > > AS400Text text50Type = new AS400Text(50, ccsid, system); > > AS400Bin4 intType = new AS400Bin4(); > > > > String nameSpace = "SPLFILES "; > > > > ProgramCall pgm = new ProgramCall(system); > > > > // Ejecutamos en primer lugar la API de creacion de un User Space. > > ProgramParameter[] parms = new ProgramParameter[6]; > > > > byte[] userSpace = new byte[20]; > > > > text20Type.toBytes(nameSpace, userSpace, 0); > > parms[0] = new ProgramParameter( userSpace ); > > byte[] attribute = new byte[10]; > > text10Type.toBytes("SPLFILES",attribute,0); > > parms[1] = new ProgramParameter( attribute ); > > byte[] msgsize = intType.toBytes(new Integer(MAX_MESSAGE_SIZE) > ); > > parms[2] = new ProgramParameter( msgsize ); > > byte[] format = new byte[1]; > > text1Type.toBytes(" ", format, 0); > > parms[3] = new ProgramParameter( format ); > > > > byte[] authority = new byte[10]; > > text10Type.toBytes("*ALL",authority,0); > > parms[4] = new ProgramParameter( authority ); > > > > byte[] description = new byte[50]; > > text50Type.toBytes("",description,0); > > parms[5] = new ProgramParameter( description ); > > > > pgm.setThreadSafe(true); > > try { > > if (!pgm.run("/QSYS.LIB/QUSCRTUS.PGM", parms)){ > ***************** FUNCIONA PERFECTAMENTE > > throw new AS400Exception(pgm.getMessageList()); > > } > > int basepos = 104; > > byte[] retData = parms[0].getOutputData(); > > > > }catch(Exception e){ > > e.printStackTrace(); > > } > > > > // Ejecutamos en primer lugar la API en la que definimos el Spool > que queremos procesar > > > > ProgramParameter parms1[] = new ProgramParameter[6]; > > byte[] userSpace1 = new byte[20]; > > > > text20Type.toBytes(nameSpace,userSpace1); > > > > parms1[0] = new ProgramParameter( userSpace1 ); > > > > byte[] format1 = new byte[8]; > > text8Type.toBytes("SPLF0100", format1, 0); > > parms1[1] = new ProgramParameter( format1 ); > > byte[] userName = new byte[10]; > > text10Type.toBytes("DEMO",userName,0); > > parms1[2] = new ProgramParameter( userName ); > > > > byte[] outqName = new byte[20]; > > text20Type.toBytes("*ALL"); > > parms1[3] = new ProgramParameter( outqName ); > > > > byte[] formName = new byte[10]; > > text10Type.toBytes("*ALL"); > > parms1[4] = new ProgramParameter( formName ); > > > > byte[] userData = new byte[10]; > > text10Type.toBytes("*ALL"); > > parms1[5] = new ProgramParameter ( userData ); > > pgm.setThreadSafe(true); > > String str = ""; > > > > try { > > if (!pgm.run("/QSYS.LIB/QUSLSPL.PGM", parms1)){ > > throw new AS400Exception(pgm.getMessageList()); > //*************** NO FUNCIONA Y SALTA UNA EXCEPCION > > } > > int basepos = 104; > > byte[] retData = parms1[0].getOutputData(); > > > > }catch(Exception e){ > > e.printStackTrace(); > > } > > } ________________________________ > > > > Francisco Martin Rivas > Departamento Caravel > www.transtools.com > _____________________________________________________ Forum.HELP400 es un servicio m�s de NEWS/400. � Publicaciones Help400, S.L. - Todos los derechos reservados http://www.help400.es _____________________________________________________ Para darte de baja, env�a el mensaje resultante de pulsar mailto:[EMAIL PROTECTED]
