ibm-midrange

How to show active jobs using AS400 (JT400) client access software?

喜夏-厌秋 提交于 2020-01-15 07:29:21
问题 I want to develop as400 client access software. I want to monitor disk space, cpu usage etc.. And Job list. I got job list. But I want get to active jobs only. Please help me. This is my job List Code : try { AS400 system = new AS400 ("SERVER","USER", "PASS"); JobList jobList = new JobList(system); Enumeration list = jobList.getJobs(); while (list.hasMoreElements()) { Job j= (Job) list.nextElement(); String GCPU = Integer.toString(j.getCPUUsed()); System.out.println("Name " + j.getName() + "

Using PCRE on ILE

大兔子大兔子 提交于 2020-01-15 06:37:49
问题 I am trying to use the pcre library (from AIX) on IBM iseries. It should be possible using PASE. I installed the pcre library with the rpm provided by yips. I tried to use it in c ile source, but i couldn't achieve it. Exemples : yips, ibm, ibm redbook I can't find the way to do it. Here is what i have done so far. #include <stdio.h> #include <qp2shell2.h> #include <qp2user.h> #define JOB_CCSID 0 int main(int argc, char *argv[]) { int rc; QP2_ptr64_t id; void *getpid_pase; const QP2_arg_type

Need SQL command that will insert a row after specific row

*爱你&永不变心* 提交于 2020-01-14 06:19:05
问题 I need SQL command that will insert a row after specific row. Example:- Before table Id. Name. 1. Xyz. 2. Xyz 3. Xyz Want result need to add 'Abc' data after each 'xyz' having same id like:- Id. Name. 1. Xyz. 1. Abc 2. Xyz 2. Abc 3. Xyz 3. Abc 回答1: You need UNION ALL : SELECT t.* FROM (SELECT id, Name FROM table t UNION ALL SELECT ID, 'Abc' FROM table t ) t ORDER BY ID, NAME; This will not insert row, it just provide you run time view. If you want only insert then you need to truncate your

DB2 Using LIMIT and OFFSET

别来无恙 提交于 2020-01-09 11:10:11
问题 I am developing a Java Web service allow paging when fetching big data set from a DB2 Database on a IBM Mid Range Machine (AS400). For example; if there are 10000 records in a data set, I want to fetch them in 1000 blocks at a time. I found this article that explains that I can use LIMIT, and OFFSET. But I need to set the DB2_COMPATIBILITY_VECTOR variable to MYS . Now I have been googling and saw you can use the db2set to set this variable. But I have not been able to find out where to type

How to get authentication for /QNTC/{windows Share drive IP} in AS400?

痞子三分冷 提交于 2020-01-07 08:36:09
问题 I am trying to sync the share drive content say X:(IP)of windows , and access the contents of share drive X: from AS400 terminal using WRKLNK '/qntc/{IPADDRESS}' . As per the forum FTP Jar file from share path on windows to IFS location in AS400? the authentication of MKDIR '/QNTC/{IPADDRESS}' require separate question . So please provide solutions. 回答1: Sorry for late response. Time of year and other stuff have been very distracting. What are the OS versions of IBM i and Windows? As Windows

Avoiding SSIS script task to convert utf-8 to unicode for AS400 data to SQL Server

蹲街弑〆低调 提交于 2020-01-04 14:31:13
问题 After many tries I have concluded that the optimal way to transfer with SSIS data from AS400 (non-unicode) to SQL Server is: Use native transfer utility to dump data to tsv (tab delimited) Convert files from utf-8 to unicode Use bulk insert to put them into SQL Server In #2 step I have found a ready made code that does this: string from = @"\\appsrv02\c$\bg_f0101.tsv"; string to = @"\\appsrv02\c$\bg_f0101.txt"; using (StreamReader reader = new StreamReader(from, Encoding.UTF8, false, 1000000)

Avoiding SSIS script task to convert utf-8 to unicode for AS400 data to SQL Server

大兔子大兔子 提交于 2020-01-04 14:31:12
问题 After many tries I have concluded that the optimal way to transfer with SSIS data from AS400 (non-unicode) to SQL Server is: Use native transfer utility to dump data to tsv (tab delimited) Convert files from utf-8 to unicode Use bulk insert to put them into SQL Server In #2 step I have found a ready made code that does this: string from = @"\\appsrv02\c$\bg_f0101.tsv"; string to = @"\\appsrv02\c$\bg_f0101.txt"; using (StreamReader reader = new StreamReader(from, Encoding.UTF8, false, 1000000)

Looking for a working example of any OS/400 API wrapped in an external SQL stored procedure wrapped in a user defined SQL function

試著忘記壹切 提交于 2020-01-04 11:20:14
问题 Having two issues at the moment: 1) The below example of wrapping an OS/400 API with an external SQL stored procedure which is further wrapper in a SQL user defined table function both compiles and runs without error, but it returns blanks and zeroes for the job information when passing '*' for the job name (i.e. current job). Any tips on why would be appreciated. Note: If I pass a non-existent job, the QUSRJOBI api correctly throws an error, so the code is behaving partially correct. If I

Looking for a working example of any OS/400 API wrapped in an external SQL stored procedure wrapped in a user defined SQL function

谁说我不能喝 提交于 2020-01-04 11:19:32
问题 Having two issues at the moment: 1) The below example of wrapping an OS/400 API with an external SQL stored procedure which is further wrapper in a SQL user defined table function both compiles and runs without error, but it returns blanks and zeroes for the job information when passing '*' for the job name (i.e. current job). Any tips on why would be appreciated. Note: If I pass a non-existent job, the QUSRJOBI api correctly throws an error, so the code is behaving partially correct. If I

How do CL commands build their exact parameter lists?

折月煮酒 提交于 2020-01-04 06:36:33
问题 I have a CMD command object that drives an RPGLE program. Because the command may be called with several different parameters, some of which are mutually exclusive, I parse the parameter passed by using a data structure in the RPGLE so I can handle the different scenarios that pass the parameters in various positions. For example, the CMD file has: CMD PROMPT('Reprint Invoices and Credits') PARM KWD(ORDERNUM) TYPE(ORDER) + PROMPT('For order number:') PARM KWD(INVDATE) TYPE(*DATE) PASSATR(*YES