ISeries/AS400 Faxing ASCII

I had a bit of trouble creating a Fax on the AS400 with the AS400 Toolbox for Java. I found the solution, so I wanted to share.
I'm faxing an ASCII formatted file through iSeries. (A fax/modem pool was already set up there.)
I read the data from an BufferedReader -> String -> char[].
Then wrote the data into a BufferedArrayOutputStream, using the SCS5256Writer class from the as400.jar (jtOpen) (version 4.x for iSeries 5.2.0).
The SCS (SNA Char Stream) object is where the magic happends.
Retrieved the data as a byte[] and created a SpooledFileOutputStream (also from the Toolbox).
When the spooled file is created in the iSeries queue, the device type is now using CURRENT instead of USERASCII.
The sbmfax command (Toolbox commandCall) pickups up the specified spooled file & send it on it's way.

I had a bit of trouble creating a Fax on the AS400
with the AS400 Toolbox for Java. I found the
solution, so I wanted to share.
I'm faxing an ASCII formatted file through iSeries.
(A fax/modem pool was already set up there.)
I read the data from an BufferedReader -> String ->
char[].
Then wrote the data into a BufferedArrayOutputStream,
using the SCS5256Writer class from the as400.jar
(jtOpen) (version 4.x for iSeries 5.2.0).
The SCS (SNA Char Stream) object is where the magic
happends.
Retrieved the data as a byte[] and created a
SpooledFileOutputStream (also from the Toolbox).
When the spooled file is created in the iSeries
queue, the device type is now using *CURRENT instead
of *USERASCII.
The sbmfax command (Toolbox commandCall) pickups up
the specified spooled file & send it on it's way.Interesting. Thanks for the information. :)

Similar Messages

  • Error with DG4ODBC while setting up connectivity from oracle to IBM iSeries AS400 version V7R1

    Hi,
    I have Enterprise linux 64-bit hosting Oracle 11gR2 64-bit (11.2.0.1) database.  I have access to IBM iSeries AS400 version V7R1.  I am trying to connect to IBM iSeries from Oracle Database through ODBC connectivity using Database Link.  The following is what I have done.
    On the Database (Linux) host Installed iSeriesAccess-7.1.0-1.0.x86_64.rpm provided by IBM.
    my odbcinst.ini has the following entries:
    [PostgreSQL]
    Description             = ODBC for PostgreSQL
    Driver          = /usr/lib/libodbcpsql.so
    Setup           = /usr/lib/libodbcpsqlS.so
    FileUsage               = 1
    [iSeries Access ODBC Driver]
    Description             = iSeries Access for Linux ODBC Driver
    Driver          = /opt/ibm/iSeriesAccess/lib64/libcwbodbc.so
    Setup           = /opt/ibm/iSeriesAccess/lib64/libcwbodbcs.so
    NOTE1           = If using unixODBC 2.2.11 or later and you want the 32 and 64-bit ODBC drivers to share DSN's,
    NOTE2           = the following Driver64/Setup64 keywords will provide that support.
    Driver64                = /opt/ibm/iSeriesAccess/lib64/libcwbodbc.so
    Setup64         = /opt/ibm/iSeriesAccess/lib64/libcwbodbcs.so
    Threading               = 2
    DontDLClose             = 1
    UsageCount              = 1
    [iSeries Access ODBC Driver 64-bit]
    Description             = iSeries Access for Linux 64-bit ODBC Driver
    Driver          = /opt/ibm/iSeriesAccess/lib64/libcwbodbc.so
    Setup           = /opt/ibm/iSeriesAccess/lib64/libcwbodbcs.so
    Threading               = 2
    DontDLClose             = 1
    UsageCount              = 1
    The odbc.ini has the following entries:
    [ODBC Data Sources]
    dg4odbc = connection to db2
    [dg4odbc]
    Driver = /opt/ibm/iSeriesAccess/lib64/libcwbodbc.so
    Description=iSeries Access for Linux ODBC Driver
    LogonID=
    Password=
    Address=  (IBM host IP Address)
    location=Vm520
    noprompt=true
    system= (IBM host IP Address)
    UNICODE=UTF-8
    Naming = 0
    ConnectionType = 0
    CommitMode = 2
    ExtendedDynamic = 0
    AllowDataCompression = 1
    LibraryView = 0
    AllowUnsupportedChar = 0
    ForceTranslation = 0
    Trace = 0
    made sure I could connect via ODBC and DSN using the following command:
    isql dg4odbc oracle oracle1 -v
    +---------------------------------------+
    | Connected!                            |
    |                                       |
    | sql-statement                         |
    | help [tablename]                      |
    | quit                                  |
    |                                       |
    +---------------------------------------+
    SQL>
    SQLRowCount returns -1
    600 rows fetched
    SQL>
    could query the table in a library on AS400.
    The $ORACLE_HOME/hs/admin/initdg4odbc.ora has the following entries:
    # This is a sample agent init file that contains the HS parameters that are
    # needed for the Database Gateway for ODBC
    # HS init parameters
    HS_FDS_CONNECT_INFO = dg4odbc
    HS_FDS_TRACE_LEVEL = off
    HS_FDS_SHAREABLE_NAME=/etc/newlib/libodbc.so
    HS_FDS_TRACE_LEVEL = 255
    HS_FDS_SUPPORT_STATISTICS=FALSE
    # ODBC specific environment variables
    set ODBCINI=/etc/odbc.ini
    # Environment variables required for the non-Oracle system
    The listener entries are as follows:
        (SID_DESC =
          (SID_NAME = dg4odbc)
          (ORACLE_HOME = /opt/oracle/dbs/product/11.2.0/dbhome_1)
          (PROGRAM = dg4odbc)
    Stopped and started the listener.
    The TNS entry is as follows:
    armcdb2 =
      (DESCRIPTION =
        (ADDRESS = (PROTOCOL = TCP)(HOST = vmw-dev-rmsdb.xxx.vmc)(PORT = 1521))
        (CONNECT_DATA =
        (SID=dg4odbc)
        (HS=OK)
    Could tnsping :
    oracle@rmsdev[/opt/oracle/dbs/product/11.2.0/dbhome_1/network/admin]$ tnsping armcdb2
    TNS Ping Utility for Linux: Version 11.2.0.1.0 - Production on 11-JUL-2013 16:01:23
    Copyright (c) 1997, 2009, Oracle.  All rights reserved.
    Used parameter files:
    /opt/oracle/dbs/product/11.2.0/dbhome_1/network/admin/sqlnet.ora
    Used TNSNAMES adapter to resolve the alias
    Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = vmw-dev-rmsdb.xxx.vmc)(PORT = 1521)) (CONNECT_DATA = (SID=dg4odbc)) (HS=OK))
    OK (0 msec)
    created a public database link as follows:
    SQL> create database link samplink connect to "oracle" identified by "oracle1" using 'armcdb2';
    Database link created.
    When I run a select query I get errors as follows:
    SQL> select * from mdiaz.AREMAIL@samplink;
    select * from mdiaz.AREMAIL@samplink
    ERROR at line 1:
    ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
    408
    Below is the Trace file of dg4odbc:
    Oracle Corporation --- THURSDAY  JUL 11 2013 16:06:03.627
    Heterogeneous Agent Release
    11.2.0.1.0
    Oracle Corporation --- THURSDAY  JUL 11 2013 16:06:03.627
        Version 11.2.0.1.0
    Entered hgogprd
    HOSGIP for "HS_FDS_TRACE_LEVEL" returned "255"
    Entered hgosdip
    setting HS_OPEN_CURSORS to default of 50
    setting HS_FDS_RECOVERY_ACCOUNT to default of "RECOVER"
    setting HS_FDS_RECOVERY_PWD to default value
    setting HS_FDS_TRANSACTION_LOG to default of HS_TRANSACTION_LOG
    setting HS_IDLE_TIMEOUT to default of 0
    setting HS_FDS_TRANSACTION_ISOLATION to default of "READ_COMMITTED"
    setting HS_NLS_NCHAR to default of "AL32UTF8"
    setting HS_FDS_TIMESTAMP_MAPPING to default of "DATE"
    setting HS_FDS_DATE_MAPPING to default of "DATE"
    setting HS_RPC_FETCH_REBLOCKING to default of "ON"
    setting HS_FDS_FETCH_ROWS to default of "100"
    setting HS_FDS_RESULTSET_SUPPORT to default of "FALSE"
    setting HS_FDS_RSET_RETURN_ROWCOUNT to default of "FALSE"
    setting HS_FDS_PROC_IS_FUNC to default of "FALSE"
    setting HS_FDS_CHARACTER_SEMANTICS to default of "FALSE"
    setting HS_FDS_MAP_NCHAR to default of "TRUE"
    setting HS_NLS_DATE_FORMAT to default of "YYYY-MM-DD HH24:MI:SS"
    setting HS_FDS_REPORT_REAL_AS_DOUBLE to default of "FALSE"
    setting HS_LONG_PIECE_TRANSFER_SIZE to default of "65536"
    setting HS_SQL_HANDLE_STMT_REUSE to default of "FALSE"
    setting HS_FDS_QUERY_DRIVER to default of "TRUE"
    HOSGIP returned value of "FALSE" for HS_FDS_SUPPORT_STATISTICS
    Parameter HS_FDS_QUOTE_IDENTIFIER is not set
    setting HS_KEEP_REMOTE_COLUMN_SIZE to default of "OFF"
    setting HS_FDS_GRAPHIC_TO_MBCS to default of "FALSE"
    setting HS_FDS_MBCS_TO_GRAPHIC to default of "FALSE"
    Default value of 64 assumed for HS_FDS_SQLLEN_INTERPRETATION
    setting HS_CALL_NAME_ISP to "gtw$:SQLTables;gtw$:SQLColumns;gtw$:SQLPrimaryKeys;gtw$:SQLForeignKeys;gtw$:SQLProcedures;gtw$:SQLStatistics;gtw$:SQLGetInfo"
    setting HS_FDS_DELAYED_OPEN to default of "TRUE"
    setting HS_FDS_WORKAROUNDS to default of "0"
    Exiting hgosdip, rc=0
    ORACLE_SID is "dg4odbc"
    Product-Info:
      Port Rls/Upd:1/0 PrdStat:0
      Agent:Oracle Database Gateway for ODBC
      Facility:hsa
      Class:ODBC, ClassVsn:11.2.0.1.0_0008, Instance:dg4odbc
    Exiting hgogprd, rc=0
    hostmstr:          0:   HOA After hoagprd
    hostmstr:          0:   HOA Before hoainit
    Entered hgoinit
    HOCXU_COMP_CSET=1
    HOCXU_DRV_CSET=871
    HOCXU_DRV_NCHAR=873
    HOCXU_DB_CSET=871
    HOCXU_SEM_VER=112000
    Entered hgolofn at 2013/07/11-16:06:03
    HOSGIP for "HS_FDS_SHAREABLE_NAME" returned "/etc/newlib/libodbc.so"
    Entered hgolofns at 2013/07/11-16:06:03
    libname=/etc/newlib/libodbc.so, funcname=SQLAllocHandle
    symbol_peflctx=0xaab7c2f0
    hoaerr:0
    Exiting hgolofns at 2013/07/11-16:06:03
    Entered hgolofns at 2013/07/11-16:06:03
    libname=/etc/newlib/libodbc.so, funcname=SQLBindCol
    symbol_peflctx=0xaab7c9d0
    hoaerr:0
    Exiting hgolofns at 2013/07/11-16:06:03
    Entered hgolofns at 2013/07/11-16:06:03
    libname=/etc/newlib/libodbc.so, funcname=SQLBindParameter
    symbol_peflctx=0xaab7cb6c
    hoaerr:0
    Exiting hgolofns at 2013/07/11-16:06:03
    Entered hgolofns at 2013/07/11-16:06:03
    libname=/etc/newlib/libodbc.so, funcname=SQLCancel
    symbol_peflctx=0xaab7d416
    hoaerr:0
    Exiting hgolofns at 2013/07/11-16:06:03
    Entered hgolofns at 2013/07/11-16:06:03
    libname=/etc/newlib/libodbc.so, funcname=SQLDescribeParam
    symbol_peflctx=0xaab7f7dc
    hoaerr:0
    Exiting hgolofns at 2013/07/11-16:06:03
    Entered hgolofns at 2013/07/11-16:06:03
    libname=/etc/newlib/libodbc.so, funcname=SQLDisconnect
    symbol_peflctx=0xaab7f978
    hoaerr:0
    Exiting hgolofns at 2013/07/11-16:06:03
    Entered hgolofns at 2013/07/11-16:06:03
    libname=/etc/newlib/libodbc.so, funcname=SQLEndTran
    symbol_peflctx=0xaab7fe42
    hoaerr:0
    Exiting hgolofns at 2013/07/11-16:06:03
    Entered hgolofns at 2013/07/11-16:06:03
    libname=/etc/newlib/libodbc.so, funcname=SQLExecute
    symbol_peflctx=0xaab808ac
    hoaerr:0
    Exiting hgolofns at 2013/07/11-16:06:03
    Entered hgolofns at 2013/07/11-16:06:03
    libname=/etc/newlib/libodbc.so, funcname=SQLFetch
    symbol_peflctx=0xaab80b5c
    hoaerr:0
    Exiting hgolofns at 2013/07/11-16:06:03
    Entered hgolofns at 2013/07/11-16:06:03
    libname=/etc/newlib/libodbc.so, funcname=SQLFreeHandle
    symbol_peflctx=0xaab816aa
    hoaerr:0
    Exiting hgolofns at 2013/07/11-16:06:03
    Entered hgolofns at 2013/07/11-16:06:03
    libname=/etc/newlib/libodbc.so, funcname=SQLFreeStmt
    symbol_peflctx=0xaab82144
    hoaerr:0
    Exiting hgolofns at 2013/07/11-16:06:03
    Entered hgolofns at 2013/07/11-16:06:03
    libname=/etc/newlib/libodbc.so, funcname=SQLGetData
    symbol_peflctx=0xaab83ad8
    hoaerr:0
    Exiting hgolofns at 2013/07/11-16:06:03
    Entered hgolofns at 2013/07/11-16:06:03
    libname=/etc/newlib/libodbc.so, funcname=SQLGetEnvAttr
    symbol_peflctx=0xaab84e42
    hoaerr:0
    Exiting hgolofns at 2013/07/11-16:06:03
    Entered hgolofns at 2013/07/11-16:06:03
    libname=/etc/newlib/libodbc.so, funcname=SQLGetFunctions
    symbol_peflctx=0xaab84fce
    hoaerr:0
    Exiting hgolofns at 2013/07/11-16:06:03
    Entered hgolofns at 2013/07/11-16:06:03
    libname=/etc/newlib/libodbc.so, funcname=SQLMoreResults
    symbol_peflctx=0xaab85a0a
    hoaerr:0
    Exiting hgolofns at 2013/07/11-16:06:03
    Entered hgolofns at 2013/07/11-16:06:03
    libname=/etc/newlib/libodbc.so, funcname=SQLNumResultCols
    symbol_peflctx=0xaab85fba
    hoaerr:0
    Exiting hgolofns at 2013/07/11-16:06:03
    Entered hgolofns at 2013/07/11-16:06:03
    libname=/etc/newlib/libodbc.so, funcname=SQLParamData
    symbol_peflctx=0xaab86102
    hoaerr:0
    Exiting hgolofns at 2013/07/11-16:06:03
    Entered hgolofns at 2013/07/11-16:06:03
    libname=/etc/newlib/libodbc.so, funcname=SQLPutData
    symbol_peflctx=0xaab871fc
    hoaerr:0
    Exiting hgolofns at 2013/07/11-16:06:03
    Entered hgolofns at 2013/07/11-16:06:03
    libname=/etc/newlib/libodbc.so, funcname=SQLRowCount
    symbol_peflctx=0xaab87364
    hoaerr:0
    Exiting hgolofns at 2013/07/11-16:06:03
    Entered hgolofns at 2013/07/11-16:06:03
    libname=/etc/newlib/libodbc.so, funcname=SQLSetEnvAttr
    symbol_peflctx=0xaab89054
    hoaerr:0
    Exiting hgolofns at 2013/07/11-16:06:03
    Entered hgolofns at 2013/07/11-16:06:03
    libname=/etc/newlib/libodbc.so, funcname=SQLSetDescRec
    symbol_peflctx=0xaab88e20
    hoaerr:0
    Exiting hgolofns at 2013/07/11-16:06:03
    Entered hgolofns at 2013/07/11-16:06:03
    libname=/etc/newlib/libodbc.so, funcname=SQLColAttributeW
    symbol_peflctx=0xaab7d6ba
    hoaerr:0
    Exiting hgolofns at 2013/07/11-16:06:03
    Entered hgolofns at 2013/07/11-16:06:03
    libname=/etc/newlib/libodbc.so, funcname=SQLColumnsW
    symbol_peflctx=0xaab7e264
    hoaerr:0
    Exiting hgolofns at 2013/07/11-16:06:03
    Entered hgolofns at 2013/07/11-16:06:03
    libname=/etc/newlib/libodbc.so, funcname=SQLConnectW
    symbol_peflctx=0xaab7e6b4
    hoaerr:0
    Exiting hgolofns at 2013/07/11-16:06:03
    Entered hgolofns at 2013/07/11-16:06:03
    libname=/etc/newlib/libodbc.so, funcname=SQLDescribeColW
    symbol_peflctx=0xaab7f39e
    hoaerr:0
    Exiting hgolofns at 2013/07/11-16:06:03
    Entered hgolofns at 2013/07/11-16:06:03
    libname=/etc/newlib/libodbc.so, funcname=SQLDriverConnectW
    symbol_peflctx=0xaab7fa9a
    hoaerr:0
    Exiting hgolofns at 2013/07/11-16:06:03
    Entered hgolofns at 2013/07/11-16:06:03
    libname=/etc/newlib/libodbc.so, funcname=SQLExecDirectW
    symbol_peflctx=0xaab805e6
    hoaerr:0
    Exiting hgolofns at 2013/07/11-16:06:03
    Entered hgolofns at 2013/07/11-16:06:03
    libname=/etc/newlib/libodbc.so, funcname=SQLForeignKeysW
    symbol_peflctx=0xaab80de6
    hoaerr:0
    Exiting hgolofns at 2013/07/11-16:06:03
    Entered hgolofns at 2013/07/11-16:06:03
    libname=/etc/newlib/libodbc.so, funcname=SQLGetConnectAttrW
    symbol_peflctx=0xaab82714
    hoaerr:0
    Exiting hgolofns at 2013/07/11-16:06:03
    Entered hgolofns at 2013/07/11-16:06:03
    libname=/etc/newlib/libodbc.so, funcname=SQLGetDescFieldW
    symbol_peflctx=0xaab83c76
    hoaerr:0
    Exiting hgolofns at 2013/07/11-16:06:03
    Entered hgolofns at 2013/07/11-16:06:03
    libname=/etc/newlib/libodbc.so, funcname=SQLGetDescRecW
    symbol_peflctx=0xaab83fbe
    hoaerr:0
    Exiting hgolofns at 2013/07/11-16:06:03
    Entered hgolofns at 2013/07/11-16:06:03
    libname=/etc/newlib/libodbc.so, funcname=SQLGetDiagFieldW
    symbol_peflctx=0xaab8448a
    hoaerr:0
    Exiting hgolofns at 2013/07/11-16:06:03
    Entered hgolofns at 2013/07/11-16:06:03
    libname=/etc/newlib/libodbc.so, funcname=SQLGetDiagRecW
    symbol_peflctx=0xaab84916
    hoaerr:0
    Exiting hgolofns at 2013/07/11-16:06:03
    Entered hgolofns at 2013/07/11-16:06:03
    libname=/etc/newlib/libodbc.so, funcname=SQLGetInfoW
    symbol_peflctx=0xaab85136
    hoaerr:0
    Exiting hgolofns at 2013/07/11-16:06:03
    Entered hgolofns at 2013/07/11-16:06:03
    libname=/etc/newlib/libodbc.so, funcname=SQLGetStmtAttrW
    symbol_peflctx=0xaab85456
    hoaerr:0
    Exiting hgolofns at 2013/07/11-16:06:03
    Entered hgolofns at 2013/07/11-16:06:03
    libname=/etc/newlib/libodbc.so, funcname=SQLGetTypeInfoW
    symbol_peflctx=0xaab8576e
    hoaerr:0
    Exiting hgolofns at 2013/07/11-16:06:03
    Entered hgolofns at 2013/07/11-16:06:03
    libname=/etc/newlib/libodbc.so, funcname=SQLPrepareW
    symbol_peflctx=0xaab863b0
    hoaerr:0
    Exiting hgolofns at 2013/07/11-16:06:03
    Entered hgolofns at 2013/07/11-16:06:03
    libname=/etc/newlib/libodbc.so, funcname=SQLPrimaryKeysW
    symbol_peflctx=0xaab8667c
    hoaerr:0
    Exiting hgolofns at 2013/07/11-16:06:03
    Entered hgolofns at 2013/07/11-16:06:03
    libname=/etc/newlib/libodbc.so, funcname=SQLProcedureColumnsW
    symbol_peflctx=0xaab86a14
    hoaerr:0
    Exiting hgolofns at 2013/07/11-16:06:03
    Entered hgolofns at 2013/07/11-16:06:03
    libname=/etc/newlib/libodbc.so, funcname=SQLProceduresW
    symbol_peflctx=0xaab86e64
    hoaerr:0
    Exiting hgolofns at 2013/07/11-16:06:03
    Entered hgolofns at 2013/07/11-16:06:03
    libname=/etc/newlib/libodbc.so, funcname=SQLSetConnectAttrW
    symbol_peflctx=0xaab874ac
    hoaerr:0
    Exiting hgolofns at 2013/07/11-16:06:03
    Entered hgolofns at 2013/07/11-16:06:03
    libname=/etc/newlib/libodbc.so, funcname=SQLSetStmtAttrW
    symbol_peflctx=0xaab896c8
    hoaerr:0
    Exiting hgolofns at 2013/07/11-16:06:03
    Entered hgolofns at 2013/07/11-16:06:03
    libname=/etc/newlib/libodbc.so, funcname=SQLSetDescFieldW
    symbol_peflctx=0xaab88b00
    hoaerr:0
    Exiting hgolofns at 2013/07/11-16:06:03
    Entered hgolofns at 2013/07/11-16:06:03
    libname=/etc/newlib/libodbc.so, funcname=SQLStatisticsW
    symbol_peflctx=0xaab89e64
    hoaerr:0
    Exiting hgolofns at 2013/07/11-16:06:03
    Entered hgolofns at 2013/07/11-16:06:03
    libname=/etc/newlib/libodbc.so, funcname=SQLTablesW
    symbol_peflctx=0xaab8a668
    hoaerr:0
    Exiting hgolofns at 2013/07/11-16:06:03
    Exiting hgolofn, rc=0 at 2013/07/11-16:06:03
    HOSGIP for "HS_OPEN_CURSORS" returned "50"
    HOSGIP for "HS_FDS_FETCH_ROWS" returned "100"
    HOSGIP for "HS_LONG_PIECE_TRANSFER_SIZE" returned "65536"
    HOSGIP for "HS_NLS_NUMERIC_CHARACTER" returned ".,"
    HOSGIP for "HS_KEEP_REMOTE_COLUMN_SIZE" returned "OFF"
    HOSGIP for "HS_FDS_DELAYED_OPEN" returned "TRUE"
    HOSGIP for "HS_FDS_WORKAROUNDS" returned "0"
    HOSGIP for "HS_FDS_MBCS_TO_GRAPHIC" returned "FALSE"
    HOSGIP for "HS_FDS_GRAPHIC_TO_MBCS" returned "FALSE"
    Invalid value of 64 given for HS_FDS_SQLLEN_INTERPRETATION
    treat_SQLLEN_as_compiled = 1
    Exiting hgoinit, rc=0 at 2013/07/11-16:06:03
    hostmstr:          0:   HOA After hoainit
    hostmstr:          0:   HOA Before hoalgon
    Entered hgolgon at 2013/07/11-16:06:03
    reco:0, name:oracle, tflag:0
    Entered hgosuec at 2013/07/11-16:06:03
    Exiting hgosuec, rc=0 at 2013/07/11-16:06:03
    Entered hgopoer at 2013/07/11-16:06:03
    hgopoer, line 233: got native error 408 and sqlstate 410; message follows...
    408
    Exiting hgopoer, rc=0 at 2013/07/11-16:06:03
    hgolgon, line 193: calling SQLSetConnectAttr got sqlstate 410
    Exiting hgolgon, rc=28500 at 2013/07/11-16:06:03 with error ptr FILE:hgolgon.c LINE:193 FUNCTION:hgolgon() ID:Connection Attribute: TRACE
    hostmstr:          0:   HOA After hoalgon
    RPC Calling nscontrol(0), rc=0
    hostmstr:          0: RPC Before Exit Agent
    hostmstr:          0:   HOA Before hoaexit
    Entered hgoexit at 2013/07/11-16:06:03
    Exiting hgoexit, rc=0
    hostmstr:          0:   HOA After hoaexit
    hostmstr:          0: RPC After Exit Agent
    I have looked up the errors on Oracle forums and could not get any valuable help anywhere.  
    Can someone kindly help out where I am going wrong?
    Thanks,
    Ram.

    Hello kgronau,
    Thank You very much for your recommendations.  I removed the parameter HS_FDS_TRACE_LEVEL = 255.
    I added HS_FDS_FETCH_ROWS=1 and also HS_NLS_NCHAR = UCS2
    Tested my sql statement, which yielded the result as follows:
    SQL> select * from mdiaz.AREMAIL@samplink;
    select * from mdiaz.AREMAIL@samplink
    ERROR at line 1:
    ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
    ㈵″㠵6
    SO I thought I would give a try of removing the line HS_NLS_NCHAR = UCS2
    and again tested my sql statement and it worked like a charm!!!!
    I tested a count(*) and got the results back.
    SQL> select count(*) from mdiaz.AREMAIL@samplink;
      COUNT(*)
           600
    I really appreciate your valuable pointers and help.
    Thanks once again!!!
    Ram.

  • Reg - iseries/ AS400 & DB2

    Hi Gurus,
      I have knowledge in SAP Basis & Security, i need to study iseries \ As400 & DB2.  Pls inform me  what are the topics i need to covered for my work related.
    My company config is - SAP on DB2 for  i5/0S.
    Thanks & Regards
    Rajesh.

    Hi,
    you should have a look at:
    http://www.easymarketplace.de/iSeries-Docu.php
    especially on:
    - New "Implementing SAP applications on the IBM System i platform with IBM i5/OS" Redbook (SG24-7166-00) in the web
    - New "An Overview of Installing SAP applications on System i models" Redpaper (REDP-4189-00) in the web
    - Old, but still in use "Implementing SAP R/3 on OS/400" Redbook (SG24-4672-03) in the web
    Regards
    Volker Gueldenpfennig, consolut international ag
    http://www.consolut.de - http://www.4soi.de - http://www.easymarketplace.de

  • Reseting  User ddic uflag parameter in Client 00 On Iseries as400 v5r4m0

    Hi
    I am busy doing a homogenous system copy from my prd system to a new 4th system (for Migration possibilities). I know that at the end of my db copy it will prompt ,me to provide the ddic password. My source system ddic user id (prd) at the moment is locked. I intend backuping up the prd sytem tonight, but i need to reset user ddic first, as whatever gets backed up will come across.
    Does anyone know how to reset the uflag paramter of ddic in client 000.
    I have only two users in client 000 i.e ddic and sap* and i cant do anythign with sap* as it  has no profiles attached to it.(security issue)  I know how to do the unlock of the user in oracle i.e
    Oracle
    Update USR02 set UFLAG=0 where BNAME='DDIC' and MANDT=000.
    Can anyone help on the as400 side.

    Hi Morga,
    If I understand correctly, you just need help how to issue SQL commands natively on the iSeries, is that right?
    If so, that's how you'd proceed:
    Sign on to the machine via green screen as user <sid>OFR and then type STRSQL. You'll then get as screen that allows you to enter the SQL statement like you suggested it for Oracle.
    STRSQL is a product which does not come for free. So, if you do not have that installed, you could use SQLUTIL. SQLUTIL is free, but not per default on the system. (Search for library QGPTOOLS.)
    In case you don't have it, read SAP note 68732 for more information of how to get it.
    Hope that helps.
    Best regards,
    Dorothea

  • Placing the File in ISeries AS400 FTP Server

    Hi,
    I am working in IDOC to file Scenario and trying to append the Records in the flat file in AS400 FTP Server Directory.
    I am unable to place to file in the FTP Server and getting the error message as below.
    Message processing failed. Cause: com.sap.engine.interfaces.messaging.api.exception.MessagingException: An error occurred while connecting to the FTP server 'xx.xx.xxx.xxx:21'. The FTP server returned the following error message: 'com.sap.aii.adapter.file.ftp.FTPEx: 501  File identifier not valid in MKD subcommand.'. For details, contact your FTP server vendor
    Please provide your valuable suggestion on this.

    Now I am getting the error message as below
    Delivering the message to the application using connection File_http://sap.com/xi/XI/System failed, due to: com.sap.engine.interfaces.messaging.api.exception.MessagingException: An error occurred while connecting to the FTP server xx.xx.xxx.xx:21'. The FTP server returned the following error message: 'com.sap.aii.adapter.file.ftp.FTPEx: 426 Unable to open or create target file SPD3INTMCD.txt in library FTPLIB. Data transfer ended.'. For details, contact your FTP server vendor..
    Please suggest on this.

  • DbXplorer IBM iSeries AS400 tables not showing

    Hi all,
    I was hoping to use the JPA generation on our IBM AS400 tables.
    The DbXplorer gets connected to our AS400 over the JT400 Toolbox JDBC type 4.0 driver. All schema's/libraries show.
    However when I open a specific library no tables are shown.
    How come my tables are not showing?
    This is my configuration:
    Driver Class: jt400.jar (Official V5R2, not JTOpen, although I have tried that one to.)
    JDBC Driver Class: com.ibm.as400.access.AS400JDBCDriver
    Database URL: jdbc:as400://SERVERNAME;date format=iso;libraries=*LIBL,FXSARTHUR
    Logging:
    These entries show in the com.m7.nitrox log:
    14-apr-2008 10:39:55 com.m7.wide.eclipse.jstudio.Plugin activate
    INFO: max mem: 748
    14-apr-2008 11:05:50 com.m7.wide.database.preferences.DatabaseDefaults getDriverClassNames
    SEVERE: java.lang.NoClassDefFoundError: com/ibm/sslight/SSLightKeyRing
    14-apr-2008 11:05:50 com.m7.wide.database.preferences.DatabaseDefaults getDriverClassNames
    SEVERE: java.lang.NoClassDefFoundError: javax/servlet/http/HttpServlet
    14-apr-2008 11:05:51 com.m7.wide.database.preferences.DatabaseDefaults getDriverClassNames
    SEVERE: java.lang.NoClassDefFoundError: com/ibm/as400/ui/framework/java/DataBean

    Hi Arthur,
    The DbXplorer is not tested against AS400 platform. Please open a support case to investigate more into this configuration.
    http://support.bea.com/
    Thanks!

  • Can MQ Adapter read from iSeries AS400 MQ Queues?

    Adapter documentation suggests it is only certified for IBM Websphere MQ 7.0. Has any one used MQ Adapter to read messages from i Series AS400?

    Hi,
    The possibilities are the MQ adapter is not running correctly or the host machine where MQ server is installed is not reachable or the MQ queue manager is not up etc...
    Please do the following steps to find the error.
    1. Set agent_log_level to 2 in adapter.ini file and restart the adapter.
    2. Look at the log file for the exact error.
    Try to ping the host machine where MQ server is installed.
    Check whether the queue manager is up and running in MQ server.

  • AS400 (iSeries) Printing to HP LaserJet M5035 MFP Tray 3

    Hi,
    Am trying to print from (iSeries) AS400 to tray 3 of HP LaserJet M5035, but the print keeps on diverting to tray 2 (A4). The iSeries is sending the job as A3, so one would assume the printer would print this job to tray 3 (A3), but it does not... Support have looked at the printer config on the iSeries and can do nothing more to change the tray... Does the M5035 have a setting that needs to be changed to allow this... ?

    I just spent the last two days on this and have finally sorted it out. It actually isn't that hard to do but for some reason, no one has consolidated the information in one place!
    First and foremost, make sure that you have all the latest and greatest firmware updates for your printer, your computer and your mobile devices.
    Next, you need to connect your printer to your network via an ethernet cable, this is the only way to get in to the printer softare to configure it for your wireless network.
    Navigate the printer menus on the keypad to Reports>Config Report and print this report. It will provide you with the IP adress and IPv4 address for the printer.
    With the printer connected to your network and powered on, point your browser to the IP address of the printer. If this doen't work (it didn't for me) use the IPv4 address.
    This will open the configuration panel for the printer and will let you configure the wireless for the printer so that it can join your wireless network. You will see various tabs across the top. Select network. Then along the left you will see wireless. Choose that. Now you should see a list of wireless networks available including your very own home network. Choose that one, enter your password and hit apply.
    Disconnect the ethernet cable and you should be ready to Airprint from all devices. This worked for me, I can't imagine it won't work for all...then again...

  • Problem FTP Stor with iSeries

    Hello,
    Here is my problem. I try desperately to upload the content of a file to an IBM iSeries (AS400) in a java program.
    I have found the way to download the content of a file from iSeries to PC, that's made by the method getFileContent, and it works fine.
    But I cannot upload the content of a text file in my PC to the iSeries and I don't know why. I use for this the
    setFileContent method. The file specified on the iSeries to receive my datas is well created or cleared (if it aready exists), but it stays desperately empty. No data seem to be written in. I have also tried to use the appe command, but it doesn't work anyway.
    Please can someone help me and find what's wrong in my code, and how to do this?
    Thank you very much
    import java.net.Socket;
    import java.io.BufferedReader;
    import java.io.PrintWriter;
    import java.io.InputStreamReader;
    import java.io.IOException;
    import java.util.regex.*;
    import java.io.*;
    public class FTPClient {
    static int portDatas;
    private BufferedReader in = null;
    private BufferedReader in2 = null;
    private PrintWriter out = null;
    private BufferedWriter out2 = null;
    private Socket socket = null;
    private String hostName;
    private int hostPort;
    private String user;
    private String password;
    private String library;
    private String file;
    private String member;
    private boolean isPASV;
    private FTPClient commandPort;
    private FTPClient datasPort;
    static StringBuffer fileContent = new StringBuffer();
    private static boolean stopped = false;
    private int mode;
    static BufferedWriter bufferedWriter;
    private File fileMember = null;
    private String fileSeparator = System.getProperty("file.separator");
    // Constructeur priv�
    private FTPClient(boolean isPASV) {
    this.isPASV = isPASV;
    // Constructeur publique
    public FTPClient(String hostName, int hostPort, String user, String password)
    this.hostName = hostName;
    this.hostPort = hostPort;
    this.user = user;
    this.password = password;
    commandPort = new FTPClient(true);
    datasPort = new FTPClient(false);
    // M�thode servant � rappatrier sous forme d'une String, le contenu d'un membre AS400
    public String getFileContent(String library, String file, String member){
    commandPort.library = library;
    commandPort.file = file;
    commandPort.member = member;
    if (commandPort.open(hostName, hostPort)) {
    commandPort.login(user, password);
    commandPort.passive();
    if (datasPort.open(hostName, portDatas)){
    commandPort.retrieve();
    return datasPort.getContent();
    // M�thode servant � rappatrier sous forme d'un Fichier txt, le contenu d'un membre AS400
    public String getFile(String library, String file, String member, String folderPath){
    boolean fileOk = false;
    commandPort.library = library;
    commandPort.file = file;
    commandPort.member = member;
    if (! folderPath.trim().endsWith(fileSeparator)) {
    folderPath += fileSeparator;
    if (commandPort.open(hostName, hostPort)) {
    commandPort.login(user, password);
    commandPort.passive();
    if (datasPort.open(hostName, portDatas)){
    fileMember = new File(folderPath + member + ".txt");
    try {
    fileOk = fileMember.createNewFile();
    bufferedWriter = new BufferedWriter(new FileWriter(fileMember));
    commandPort.retrieve();
    bufferedWriter.write(datasPort.getContent());
    bufferedWriter.close();
    catch (IOException ex) {
    fileOk = false;
    if (fileOk) {
    return fileMember.getAbsolutePath() ;
    else {
    return "";
    // M�thode servant � rappatrier vers l'AS400, un DSPF se trouvant dans un fichier
    public void setFileContent(String library, String file, String member, String filePath){
    commandPort.library = library;
    commandPort.file = file;
    commandPort.member = member;
    if (commandPort.open(hostName, hostPort)) {
    commandPort.login(user, password);
    commandPort.passive();
    if (datasPort.open(hostName, portDatas)){
    commandPort.store(filePath);
    datasPort.meuh(filePath);
    private boolean isMsgValid(String msg, String code) {
    if (msg != null && msg.startsWith(code)) {
    return true;
    return false;
    private boolean readWelcomeMessage() {
    String msg = waitLine();
    //System.out.println(msg);
    return isMsgValid(msg,"220");
    // Ouverture du Socket vers la machine host
    private boolean open(String server, int port) {
    try {
    socket = new Socket(server, port);
    catch (IOException ex) {
    //System.out.println(ex.getMessage());
    return false;
    try {
    in = new BufferedReader(new InputStreamReader(socket.getInputStream()));
    catch (IOException ex) {
    //System.out.println(ex.getMessage());
    return false;
    try {
    out = new PrintWriter(socket.getOutputStream());
    out2 = new BufferedWriter(new OutputStreamWriter(socket.getOutputStream()));
    catch (IOException ex) {
    //System.out.println(ex.getMessage());
    return false;
    if(isPASV) // si port de commandes
    readWelcomeMessage();
    else // si port des donn�es
    stopped = true;
    new Thread()
    public void run()
    try {
    String line=null;
    while (true) {
    line = in.readLine();
    if (null != line) {
    fileContent.append(line + "\n");
    }else
    stopped=false;
    break;
    catch (IOException ex1) {
    ex1.printStackTrace();
    }.start();
    return true;
    private synchronized String getContent()
    while(stopped)
    try {
    Thread.sleep(200);
    catch (InterruptedException ex) {
    break;
    String ret = fileContent.toString();
    fileContent.setLength(0);
    return ret;
    // Fermeture de la connexion
    private void close() {
    try {
    out.close();
    in.close();
    socket.close();
    catch (Exception fe) {
    //System.out.println("RESOURCE CLOSE EXCEPTION " + fe.getMessage());
    private String waitLine() {
    try {
    return in.readLine();
    catch (IOException ex) {
    return null;
    // Connexion � la machine avec utilisateur et mot de passe
    private boolean login(String user, String pass) {
    if (sendUser(user)) {
    return sendPass(pass);
    else {
    return false;
    // Passage du nom d'utilisateur
    private boolean sendUser(String user) {
    out.println("user " + user);
    out.flush();
    try {
    String line = in.readLine();
    //System.out.println(line);
    return isMsgValid(line,"220");
    catch (IOException ex) {
    return false;
    // Passage du mot de passe
    private boolean sendPass(String pass) {
    try {
    String line = in.readLine();
    //System.out.println(line);
    if (line != null && isMsgValid(line,"331")) {
    else
    return false;
    catch (IOException ex) {
    return false;
    out.println("pass " + pass);
    out.flush();
    try {
    String line = in.readLine();
    //System.out.println(line);
    if (line != null && isMsgValid(line,"230")) {
    return true;
    catch (IOException ex) {
    return false;
    return false;
    // Passage en mode passif avec r�cup�ration du port de transfert de donn�es
    private boolean passive(){
    out.println("pasv" );
    out.flush();
    try {
    String line = in.readLine();
    Pattern p2 = Pattern.compile("((\\d)+,(\\d)+,(\\d)+,(\\d)+,((\\d)+),((\\d)+))", Pattern.CASE_INSENSITIVE);
    Matcher m2 = p2.matcher(line);
    if (m2.find(1)) {
    portDatas = (Integer.parseInt(m2.group(6)) << 8) + Integer.parseInt(m2.group(8));
    //System.out.println(line);
    return true;
    catch (IOException ex) {
    return false;
    // R�cup�ration du contenu du fichier pass� en param�tre � la m�thode getSource
    private boolean retrieve(){
    out.println("retr "+ library + "/" + file + "." + member);
    out.flush();
    try {
    String line = in.readLine();
    //System.out.println(line);
    return true;
    catch (IOException ex) {
    return false;
    // Copie du contenu du fichier en direction de l'host
    private boolean store(String filePath){
    out.println("stor "+ library + "/" + file + "." + member);
    out.flush();
    /*try {
    String line = in.readLine();
    System.out.println(line);
    BufferedReader bufferedReader = new BufferedReader(new FileReader(filePath));
    String str;
    while ((str = bufferedReader.readLine()) != null) {
    out.write(str);
    out.flush();
    System.out.println(str);
    bufferedReader.close();
    return true;
    catch (IOException ex) {
    return false;
    return true;
    private void meuh(String filePath){
    try {
    BufferedReader bufferedReader = new BufferedReader(new FileReader(filePath));
    String str;
    while ((str = bufferedReader.readLine()) != null) {
    out2.write(str);
    out2.flush();
    System.out.println(str);
    bufferedReader.close();
    catch (IOException ex) {
    System.out.println(ex.getMessage());
    // Finalisation (fermeture des ports)
    protected void finalize() {
    commandPort.close();
    datasPort.close();
    }

    any problem with using the builtin ftp url abilities in jdk1.5 or any of the available ftp libraries?
    If you have to do it yourself, I would seriously recommend investigating the difference between binary and ascii transfer and not always using the BufferedReader/PrintWriter technique.
    use formatting as described here http://forum.java.sun.com/faq.jsp#format

  • File Adapter to iSeries IFS "Configured source directory does not exist"

    Good day, All
    We are using PI 7.1
    I need the PI file adapter to pull a file off of an iSeries(AS400) IFS folder directory.
    I'm able to configure the file adapter to pull off files from the PI server C and D drives.
    I'm able to configure the file adapter to pull off files from other network drives.
    But the iSeries IFS folder keeps coming back "does not exist".
    I've configured the Source Directory with / and with \ and it doesn't help.
    I am able to navigate to the folder while logged into the PI server as the server admin.
    I've tried mapping a drive on the server to the IFS folder but that doesn't work either.
    Please help!!!
    I've wasted too much time trying different settings on this already.
    Any assistance would be greatly appreciated.
    Thanks,
    Chad

    Dear Chad,
    Please go through the following SDN link :
    - Configured source directory .... does not exist was suppressed
    give the write permisson to the directory for everyone group and check if that helps.
    Also, kindly go through the following links :
    1) http://wiki.sdn.sap.com/wiki/display/XI/TroubleshootingtheFile+Adapter (point 2)
    2) Not able to read files from Windows directory to Unix Server using NFS
    which might give some hints in solving your issue.
    Best Regards
    Nishwanth

  • Read the output of the iseries CL Program from Java

    I have a Java program running on the iseries(AS400). I need to call a CL program from this JAVA.I have to pass 7 arguments to it.Out of 7, three are input parameters to CL and other 4 are its output parameters to the calling JAVA program. I am using Runtime.getRuntime().exec(arguments) to call the CL. Please suggest me how to read the output from the CL in the JAVA program.

    http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html
    Kidding:
    If a method has at least 7 parameters, chances are one or two have been forgotten.

  • Does Hyperion Integration Server exist for AS400?

    I need drill through to AS400. I have IBM Data warehouse 7.1 y db2 olap 7.1 on AS400, but sql drill through come with Integration Server.There are any way to install integration server on AS400??

    Yes.. ShowCase is porting EIS 6.5 for the iSeries/AS400. It should be released by late Q3 2002. Check either with IBM or ShowCase (depending on where you got your DB2 7.1) for 8.1 availability

  • FTP to iSeries produces no results?

    I am trying to connect to an iSeries AS400.   My connection completes properly and changes my directory to the appropriate library location.   When I look at the FTP log I see all of the files in the list that I want to retrieve.    But, those files do not appear in my Remote window so that I can GET them into my Dreamweaver site.
    Please help!!!    I've looked and called everywhere I can think to resolve my issue.

    The question is best asked on the Dreamweaver forum. This forum is for Adobe Creative Suite wide issues, or installation issues for the Suite.

  • IBM DB2 iSeries - 3.1

    Hello,
    Does new sqldevelopper 3.1 supports IBM DB2 iSeries (AS400) ?
    If not, is there an estimated date ?
    Waiting so...
    Thanks a lot

    Certify is located at:
    http://www.oracle.com/technetwork/developer-tools/sql-developer/certification-096745.html

  • How to migrate the data in AS/400 to Oracle

    I have a customer, they plan to migrate their data from AS/400 DB2 V5R3,V6R1 to Oracle 11g. Since the source system is in production, they can only halt for 48 hours,
    which way is the fastest?
    ORACLE workbench can only support to IBM DB2/400 V4R3 and V4R5, must we export the data from AS400 to ASCII then sql load to Oracle, the user data size is about 3T?
    even get the initial data, how to capture the increased data? Oracle GoldenGate 11g can't access AS400 as source.

    Hello,
    An option would be to use the Database Gateway for DRDA. With this tool, all the data in the iSeries machine will be seen like an Oracle Table.
    You will be able to run statements like :
    INSERT INTO <Oracle_table> SELECT <col1, col2.....> FROM <iSeries_table>@AS400
    or even like
    CREATE TABLE <oracle_table> AS SELECT * FROM <iSeries_table>@AS400
    The Database Gateway for DRDA is more an integration tool than a migration tool. You will be able to access live data on the AS/400 like this data was in Oracle
    table(s). You can even modify the AS/400 data (insert, update, delete) from Oracle. This can avoid to have to do a one-time migration.
    The Database Gateway for DRDA documentation is available at http://download.oracle.com/docs/cd/E11882_01/gateways.112/e12014/toc.htm

Maybe you are looking for

  • IPod Touch 4th gen "USB Device cannot be recognised" Help Please?

    Every time I plug it into a PC (any PC, Mac or Linux PC) the Device is not recognised at all not in iTunes or Windows, the iPod is disabled and it's my friends, his computer that he synced it on last is completely broken. I am trying to get it recogn

  • Going from lightroom to photoshop

    Somehow, I lost communication between lightroom and photoshop, and when in lightroom, I go to edit> in photoshop, it is grayed out. Is ther a simple fix, or do I have to reload photoshop? I already reloaded lightroom.

  • OracleCommandBuilder

    When using SQL Server you can use the following code to discover stored procedure parameters. Can the same thing be accomplished in Oracle? Private Shared Function DiscoverSpParameterSet(ByVal connectionString As String, _ ByVal spName As String, _ B

  • Batch Rename 1-100 without zeros, ie 001, 002

    Hi there, When renaming say 100 images, you can select three digits, and create something like: Image _001 Image _002 Image _003 Image _004 Image _005 Image _067 Image _068 Image _069 and so forth.  But if you select one digit it comes out like: Imag

  • Subtitles and Stories

    I am having some issues with subtitles and stories. I have a multi language DVD in which subtitles are to be shown over the non-English versions. The English version does not require subtitles. I authored the DVD so no subtitles will be shown when th