Questions tagged [ibm-midrange]

1

votes
3

answer
91

Views

AS400 SQL Database Query

The time column has a string type containing a time in the format HHMMSS. Sample data is: 95030 122030 132030 As you can see, there are no leading zeros. I am trying to extract the above values and convert them to something like below 95030 -> 9:50:30 122030 -> 12:20:30 The Sql Query: select ca...
Pavan_Obj
1

votes
1

answer
51

Views

IBM SQL Sum and Group By

I am trying to do a join and get the total (sum) of Line Items in Purchase orders. It is a grid on a web page. I am displaying all the info of the PO but I also want the Total dollar per line items per PO's. I get the following error message: SQL0122 Column or expression in SELECT list not valid. I...
Tretiak
1

votes
3

answer
96

Views

Is there a way to interrogate the status of AS400 jobs from VBA?

I'm trying to provide a user interface in Access to display the status of scheduled AS400 jobs, to show them as either pending, running, or complete. I've inherited some code which schedules several jobs, which runs fine - but there's no way the user can see what the job status is, and they sometime...
Belladonna
1

votes
1

answer
45

Views

Having dynamic text with MSGID in DSPF

I'm modifying an interactive program, having DSPF with an Output field: MSGERR 80A O 24 2MSGID(&§MSGID FILE_MSG) I pass an ID into MSGID and it's work perfectly. Now I have a message like this: VALUE CAN BE: &1, &2, &3 and I need to replace &1, &2, &3 with a TEXT. Is it possible using the...
Nifriz
1

votes
1

answer
46

Views

same structure - DDS vs DDL - File and level id's

In IBM i (as/400), I want same program to run against DDL and DDS created files (tables). Using 'CALL qsys2.generate_sql' API I was able to convert DDS to DLL. However once compiled, I get different File and member level id's. Here is very simple example of DDS and DLL code... A R TST_RC...
Mustapha George
1

votes
1

answer
149

Views

Java System properties in AS400

On what basis, user.language and user.country gets loaded ? QLOCALE value for the system i am using is , '/QSYS.LIB/EN_US.LOCALE'. But a job which runs from the other country say Italy, user.country and user.language are 'IT' and 'it' respectively. On what basis these values will be loaded?
Susmitha
1

votes
1

answer
170

Views

pyodbc python linux iSeriesAccess driver - stored procedure - capture output parameters?

I've read thru several threads discussing this -- however - not finding an option which appears to be the right first for my use case. Linux (RHEL 7.x) - IBM iSeriesAccess driver - Connecting to AS/400 - Python/pyodbc (ibm_db does not seem to support the iSeriesAccess driver) Call to stored procedur...
C Carpenter
1

votes
1

answer
678

Views

Configuring Classpath on IBM i (AS400) server

I am trying to setup our IBM i server to connect to an SQL server. The necessary .JAR driver file has been downloaded an uploaded to the server. We have been following these instructions . Now we are trying to set the classpath environment variable. It currently looks as below: '/QIBM/ProdData/OS40...
theju112
1

votes
1

answer
53

Views

WSO2 AS400 PCML ClassCastException

We're trying to call an AS400 Program on WSO2 5.x using WSO2 PCML Connector. We've followed instructions described here: https://docs.wso2.com/display/ESBCONNECTORS/AS400+PCML+Connector We've downloaded version 9.1 of JT400 driver here: https://sourceforge.net/projects/jt400/ As we try to call our p...
Nicolas VIOLLIN
1

votes
1

answer
738

Views

Calling an AS400 RPG program from JAVA

I am trying to call an RPG Logon program on an AS400 system from JAVA. The issue is whenever I give incorrect parameters, I get a response, such as user ID is incorrect, password is incorrect. When I give an incorrect path to the program, I do get the response saying 'Object does not exist.' Howe...
Bazooka
1

votes
1

answer
238

Views

how to get as400 spool files to text in c#

I'm trying to code a console application to get the spool file from as400 to a different destination as a text file. I have been looking around but I haven't found a small code to start from there, I been searching around and haven't found anything close. You guys have any idea or suggestion on how...
Raframi
1

votes
1

answer
46

Views

SymmetricDS does not sync data DB2 AS/400 to SQL Server

I am trying to sync data between DB2 in AS/400 and SQL Server using SymmetricDS. I am treating DB2 as master node and SQL Server as client node. I have configured *.properties files for both engines in the engines folder. Below are the properties files. server-000.properties engine.name=server-000...
Raju Rudru
1

votes
0

answer
72

Views

how to link db2 table column to another object?

I am new to DB2 and I'm working with an IBM i series system. I have an object with a special column 'X'. I want to store data for X in another object whenever some criteria satisfied and I can get data from the original object for both special records(which data have been stored in another object) a...
Nahid Bandi
1

votes
0

answer
96

Views

SSIS - change column meta data from byte stream to unicode string

I have an ADO Net Source to query data from an IBM AS/400. The column in question is of type CHAR (94). However, the meta data in SSIS shows it as a byte stream, DTS_BYTES. If I run the package, I get an error: data type of 'output column 'COLUMN_NAME' (38)' does not match the data type 'System....
Mike
1

votes
2

answer
91

Views

How can a retrieve the indicators used against each field of the display file along with this DSPATR attributes

I am trying to retrieve the indicators used against each field of the display file along with the DSPATR of the particular fields respectively. For Example: If I have a field in my display file as given below. I need to identify the field WSCRT along with the DSPATR's 'PC' - 61 , 'RI' - N62 , 'BL' -...
AKarthik
1

votes
3

answer
59

Views

Replace Function in SQL in IBMI for Multiple Characters(coming from a table)

I am facing an issue with Replace function in SQL. I have a table(Table A) which has 2 fields( Original_Char and Replacement_char). Now for a string I have in the program, I have to replace every character in the Original_char Field , to its corresponding Replacement_char Field. For Example if I hav...
AS400 User
1

votes
2

answer
74

Views

Db2 for i - dynamic FROM clause

Environment: Db2 for i, version 7.3 Library/table structure: CORPORATE/TENANTS LIB01/INVOICE LIB02/INVOICE LIB03/INVOICE … LIBxx/INVOICE The CORPORATE/TENANTS table contains a list of libraries where information about each tenant is stored. It has this structure and data: CREATE OR REPLACE TABLE T...
Benny Hill
0

votes
0

answer
5

Views

How do you display SQL Select output from CL?

I am trying to replace an old CL program that issues RUNQRY command. I can run the SQL statement from STRSQL and it will yield the same output as the query. I tried RUNSQL and RUNSQLSTM but neither support just doing a SELECT Is there a command to just display the output of SQL select?
Ruslan
1

votes
0

answer
73

Views

Printing Superscript / Subscript in RPGLE on iSeries (AS/400)

How to print subscript / superscript through RPGLE into spool file. This gets converted to pdf at the end. How to print '1st' as 1 (superscript) using RPGLE. The printer field type is character length 15. External printer file. Printer device type . . . . . . . . . : *AFPDS coded as @Symbo =...
J A
1

votes
0

answer
76

Views

XMLTABLE has atomic value issue

I am very new to XMLTABLE and this may be a very silly question. For the Below Query: Select T1.* From XmlTable ('$d/Order/OrderHeader' Passing ' a ' As 'd' Columns OrderId Char(7) Path...
AS400 User
1

votes
2

answer
57

Views

AS400FileRecordDescription.retrieveRecordFormat error out on secured connection

The main purpose of the java program below is to use the AS400FileRecordDescription class from the jtopen (version 9.6) to retrieve the record format of a physical file on iseries. It does that by calling the retrieveRecordFormat() method in this class. This program works fine if the connection i...
HockChai Lim
1

votes
2

answer
99

Views

Selection of records in RPGLE program

So there is this RPGLE program that updates/writes records in a PF (say FILE1). The RPGLE program is quite old and huge and it is advisable to not make any changes to this. Now what I need to do is to make the Program process only certain records in the file. To be more precise, process only those...
theju112
1

votes
0

answer
49

Views

Automate iSeries SFTP to a remote SFTP host

I would like to set up SFTP for our internal iSeries servers. I have 4 iSeries servers and would like to SFTP between them all. Does anyone have a good resource for helping me to accomplish this? Thanks
Gayan Perera
1

votes
0

answer
75

Views

Free UI when retrieving Data Reader from database and indicate if data retrieving is completed C#

Update 1: public static DataTable GetDataTable() { using (var conn = new iDB2Connection(ConnectionString)) { if (conn.State == ConnectionState.Open) conn.Close(); conn.Open(); iDB2Command cm = conn.CreateCommand(); cm.CommandTimeout = 0; cm.CommandType = CommandType.Text; cm.CommandText = 'SELECT...
Secret
1

votes
2

answer
144

Views

Command line switches for CWBTF.EXE aka Data Transfer From IBM i..?

I would like to add an Edit action to the right-click context menu for IBM *.DTF files in my Windows Registry. What are the command lines switches for CWBTF.EXE..? Is there a switch for 'open DTF file for editing' (but do not run it)..? I've searched Google, StackOverflow, and the the IBM i 7.3 doc...
spinjector
1

votes
0

answer
72

Views

How do I send navigation keys and extract data from IBM i Access Client Solutions?

At work I must extract data from an AS400 screen using IBM i Access Client Solutions. I used to have code that I could use with PComm; however, they recently replaced the software in my company (without asking) and that is causing delays of up to several days. Here is the old code I had: Option Expl...
vicsar
1

votes
0

answer
108

Views

How to use the PROGRAM STATUS clause in a COBOL program

How to use the PROGRAM STATUS clause in a COBOL program to control the errors. According to the IBM manuals (like https://www.ibm.com/support/knowledgecenter/ssw_ibm_i_72/rzasb/sc092539.pdf), the PROGRAM STATUS clause specifies a data item into which values from the predefined program status structu...
Higinio Fuentes
1

votes
1

answer
62

Views

How to fix “dont get a clear Array after a Programm Call”

I have written a Programm to encode some Strings. I write a 2nd Programm to call this encode-Tool. Here i create a Array (A_FELDER) and fill it with some Text. In the following Point 1 you can see my encode-Tool. In Point 2 you cann see the declaration from my Array and the FOR-LOOP. And in Point 3...
Dominik
0

votes
0

answer
7

Views

Allowed memory size exhausted when selected row has NULL value

I'm trying to connect my Laravel 5.7 project to our iSeries database. My running environment is in Docker running in a Linux environment. Whenever I try to do a SELECT on a table row that contains a NULL value, I get the following error: Allowed memory size of 134217728 bytes exhausted (tried to all...
Robert Gaum
1

votes
0

answer
36

Views

System-period temporal table and FOREIGN KEY… ON DELETE CASCADE

I am getting an error when I attempt to add a FOREIGN KEY ... ON DELETE CASCADE constraint to a system-period temporal table - in my example below the STATE table. I can have the application layer do the cleanup but I'd prefer to let the database take care of its own housekeeping. Parent table: 0001...
Benny Hill
1

votes
2

answer
29

Views

Refreshing multiple ODBC connections via background query

I am using a set of scripts that pull a lot of different data from iSeries via ODBC. ActiveWorksheets.RefreshAll does not work as it doesn't leave enough time to run the background queries I've tried the below,but to no avail Dim qry As Connections 'Set qry = For Each qry In ActiveWorksheets.Connect...
Badja
1

votes
0

answer
41

Views

How to specify a local custom SSL truststore for JTOpen?

We have a java client (mule app) which is using JTOpen for connecting to the AS400 system. The connection is secured with SSL. The driver is using the JRE truststore (jssecacerts, cacerts) by default. We would like to specify a custom truststore for the JTOpen session. The only way to do this that...
spoonboy
1

votes
0

answer
59

Views

SQL0206 Column or global variable P1 not found when inserting into DB2 table with SSIS

Using SSIS 2016 data flow and inserting into DB2 table using the latest IBM.Data.DB2.iSeries .net connector. I'm able to preview the data, and SSIS grabs the column from the DB2 table and knows the type. Table was created using: create table MyLib.ADOTEST(Col1 integer) Here is the table def: ADO Co...
tvanharp
1

votes
1

answer
2.1k

Views

NHibernate - Mapping ID to a DB2 Identity

I'm newish to NHibernate, and am attempting to wire up to a DB2 table through the ISeries provider. The table has a BIGINT primary key that is auto generated as an identity. I've tried several values for the generator property of the id in my mapping file, and haven't had any success. The table d...
AJ.
1

votes
1

answer
865

Views

How do you “parameterize” DB2/iSeries file in Reporting Services dataset?

This is a sample query for a dataset in my Microsoft Reporting Services Report (.rdl) SELECT ORDNO FROM INTERFACET.DOPPRMAH This is connecting to the iSeries via the OLE DB driver from IBM. How do I 'parameterize' the 'INTERFACET' part.
Jon Erickson
1

votes
1

answer
1.1k

Views

System i (iSeries, AS/400) Message Queuing Options

I'm trying to find options for MQ on the iSeries besides WebSphere MQ. Does anyone have experience with this? Is it possible? Could I run a pure java MQ server like OpenMQ?
Matt Davis
1

votes
2

answer
7.3k

Views

AS400 Java Java program completed with exit code 1

Every attempt to run a java program on our AS400 (I5 OS VR4, JVM 1.4.2) result in the same error message: Java program completed with exit code 1 Any suggestions?
David Hamilton
1

votes
3

answer
3.6k

Views

Unpacking AS400 packed decimal (BCD) - possibly borked by EBCDIC conversion?

I'm getting files transferred from an AS/400 to our Windows (SBS 2003) via FTP. The files are fixed-width data. The text appears fine, but some of the fields are packed decimals, which when unpacked give bad values. My assumption is that there's an implicit EBCDIC->ASCII conversion happening, whi...
Dave
1

votes
2

answer
415

Views

Log4J in AS/400

I am looking for a logging mechanism in AS/400 similar to log4j. I am thinking of writing a wrapper to the log4j in AS/400. Can someone please let me know if there is such a tool present already? Thanks, Sam
Sam Khawase
1

votes
1

answer
4.7k

Views

Fetching data from excel sheet in AS/400

I am using AS/400 with Reflections for IBM. Here is my question: How can the data from an excel sheet be transfered to an AS/400 session. From there I should be a ble to create macros to add the info to where ever it needs to be inserted.
Shantanu Gupta

View additional questions