Package com.ibm.as400.access

Examples of com.ibm.as400.access.IFSFileInputStream


                // Else, inputData will remain null.
            }

            if (input && output) {
                LOG.trace("Parameter {} is both input and output.", i);
                parameterList[i] = new ProgramParameter(inputData, length);
            } else if (input) {
                LOG.trace("Parameter {} is input.", i);
                if (inputData != null) {
                    parameterList[i] = new ProgramParameter(inputData);
                } else {
                    parameterList[i] = new ProgramParameter();
                    parameterList[i].setParameterType(ProgramParameter.PASS_BY_REFERENCE);
                    parameterList[i].setNullParameter(true); // Just for self documentation.
                }
            } else {
                // output
                LOG.trace("Parameter {} is output.", i);
                parameterList[i] = new ProgramParameter(length);
            }
        }

        return parameterList;
    }
View Full Code Here


            if (output) {
                outputLength = getISeriesEndpoint().getOutputFieldLength(i);
            }

            if (input && output) {
                parameterList[i] = new ProgramParameter(inputData, outputLength);
            }
            if (input) {
                parameterList[i] = new ProgramParameter(inputData);
            }
            if (output) {
                parameterList[i] = new ProgramParameter(outputLength);
            }
        }

        return parameterList;
    }
View Full Code Here

      mResolution = getResolution(config, system.getName());
      mEncoding = getEncoding(mAS400System, system.getName());
      String filename = config.getValue(Constants.CHAPTER_SYSTEM, system
          .getName(), Constants.KEY_FILENAME);
      filename = system.replaceAllMarkers(filename)[0];
      mQSYSobjPathname = new QSYSObjectPathName(filename);
    }
    catch (Exception ex)
    {
      throw new XException(Constants.LOCATION_EXTERN,
          Constants.LAYER_TECHNICAL,
View Full Code Here

   *         the QSYS file system
   */
  protected String getRenamedMember(QSYSObjectPathName qsysPathname,
      String newMember)
  {
    return new QSYSObjectPathName(qsysPathname.getLibraryName(),
        qsysPathname.getObjectName(), newMember, qsysPathname
            .getObjectType()).getPath();
  }
View Full Code Here

      // returned
      // without modifications.
      // Create an object in the integrated file system for the file name.
      // It is used to parse an integrated file system name into its
      // components.
      mQSYSObject = new QSYSObjectPathName(xbusSystem
          .replaceAllMarkers(mConfigFilename)[0]);
      IFSFile ifsFile = new IFSFile(mAS400System, mQSYSObject.getPath());

      // only if the file exist and it is accessible.
      if (ifsFile.exists())
View Full Code Here

    // Rename member if resolution = rename
    else if (mResolution.equals(Constants.READ_RENAME))
    {
      // Get new path with date as member name.
      mRenamename = getRenamedMember(new QSYSObjectPathName(mQSYSObject
          .getPath()), "SV" + Constants.getAS400DateFormat());
      // Execute renaming
      renameFile(mAS400System, mQSYSObject.getPath(), mRenamename);
    } // Rename
View Full Code Here

   * @see net.sf.xbus.technical.LineReader#readRecord()
   */
  public String readRecord() throws XException
  {
    String result = null;
    Record record;
    try
    {
      record = mOriginFile.readNext();
    }
    catch (Exception e)
    {
      throw new XException(Constants.LOCATION_EXTERN,
          Constants.LAYER_TECHNICAL,
          Constants.PACKAGE_TECHNICAL_AS400, "0", e);
    }
    if (record != null)
    {
      byte[] inData = null;
      // save record contents to the byte array
      try
      {
        inData = record.getContents();
      }
      catch (Exception e)
      {
        throw new XException(Constants.LOCATION_EXTERN,
            Constants.LAYER_TECHNICAL,
View Full Code Here

        String token = tokenizer.nextToken();
        // Characters written to it are translated into bytes array
        // according to a specified character encoding.
        dataByte = charConverter.stringToByteArray(token);
        // Save byteArray into Record based on the file format
        Record record = format.getNewRecord(dataByte);
        // write Record into file
        file.write(record);
      }
      mOriginFile.close();
    }
View Full Code Here

      mOriginFile.open(AS400File.READ_WRITE, 0,
          AS400File.COMMIT_LOCK_LEVEL_NONE);

      // Read records
      byte[] inData = null;
      Record record;
      while ((record = mOriginFile.readNext()) != null)
      {
        inData = record.getContents();
        retBuffer.add(inData);
      }
      // close the file since I am done using it
      mOriginFile.close();
View Full Code Here

          AS400File.COMMIT_LOCK_LEVEL_DEFAULT);

      for (Iterator it = ((ByteArrayList) callData).iterator(); it
          .hasNext();)
      {
        Record record = format.getNewRecord((byte[]) it.next());
        // write Record into file
        file.write(record);

      }
      mOriginFile.close();
View Full Code Here

TOP

Related Classes of com.ibm.as400.access.IFSFileInputStream

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.