ibm-midrange

Write a macro for C/C++ #include

痞子三分冷 提交于 2019-12-10 17:16:50
问题 I work on AS/400 which is sometimes non-POSIX. We also need to compile our code on UNIX. We have an issue with something as simple as #include. On AS/400, we need to write: #include "*LIBL/H/MYLIB" On UNIX, we need to write #include "MYLIB.H" At the moment we have this (ugly) block at the top of each C/C++ file: #ifndef IS_AS400 #include "*LIBL/H/MYLIB" /* others here */ #else #include "MYLIB.H" /* others here */ #endif We would like a unified macro. Is this possible? I don't know how to

What is the carriage return character in an AS/400 db?

时光怂恿深爱的人放手 提交于 2019-12-10 17:14:25
问题 I have a client running an AS/400. I have to ftp a flat file over to them. They tell me their return charaters are RN. I don't recognize this, could not find anything on it, and their tech guy is Nick Burns so he refuses to give me any dirtection. Is there a standard return code for AS/400? I should have mentioned that I have a c# .NET 2.0 console application. 回答1: The AS/400 uses EBCDIC as a character set, rather than either the DOS or Unix ASCII character set. In Unix, text file lines

AS400.validateSignon() does not reset the failed signon attempts to 0

回眸只為那壹抹淺笑 提交于 2019-12-10 15:31:54
问题 When I use com.ibm.as400.access.AS400.validateSignon() to authenticate a user's credentials and they pass the validation, and have successfully connected, it does not reset the "failed signon attempts" to 0. When entering an incorrect password the field "failed signon attempts" is incremented; when successfully signing on the "failed signon attempts" still maintains that there were invalid signons. Strangely enough the "previous sign-on" is updated with the correct date & time. Here is a dump

'grep -l' is not working for a folder with sub folders

有些话、适合烂在心里 提交于 2019-12-10 12:17:15
问题 I am trying to search for file contents. The file is in a directory with sub folders. The command grep -l 'keyword' is working and is finding all files which are under a folder. If I am searching in a folder with subfolders, I am not getting any results. Is there any way to search file contents using a directory level search? 回答1: You need to do something like this: find . -type f -exec grep -l 'keyword' {} \; You can also limit the find with the -name option and give it a shell regular

AS/400 DB2 Logical File vs Table Index

[亡魂溺海] 提交于 2019-12-09 18:03:22
问题 I'm coming from a MSSQL background, and when I ask people at my company if they've created Indexes on certain columns they'll say yes but point me to these things call Logical Files. In the iSeries Navigator these Logical Files show up under the 'Views' category. When I click the 'Indexes' category nothing is there, leading me to believe that there are actually no Indexes created on any columns, at least as I understand them. A Logical File appears to be a View sorted by certain columns. So

Automated testing in RPG (or other ILE languages)

我是研究僧i 提交于 2019-12-09 11:15:39
问题 we have quite a lot of RPG-programs here, and we do a lot of automated testing, but we are not very good yet in combining those two. Are there good ways to do automated testing on RPG programs -- or on any other ILE programs for that matter? I am aware of a project named RPGUnit, but that has it's last update in 2007. However, it seems it is still used, since RPG Next Gen is currently putting some work in including it. What's you experience with those? Is there something else, that I am

AS400 RPG Simulator

半城伤御伤魂 提交于 2019-12-09 05:57:55
问题 I have a urgent requirement to call an RPG Program from java. As suggested in this Accessing RPG on iSeries from Java question. I am planning to use JTOpen. But unfortunately I dont have access to any of theses systems. So is there any way I can test the java program ? Are there any RPG simulators for Windows? Any help or ideas will be highly useful With Regards, Srinivas 回答1: You used to be able to get free access to an iSeries at Innovative Systems (this service has been discontinued as of

Need help to get data out of an as400 system

谁都会走 提交于 2019-12-08 21:03:50
I have a plenty of tables and databases. most of the tables have empty spaces and no table col has a descriptive name.. can somebody help me to get the data out of there? thanks Take a look at this link For documentation purposes here is the key information. If you need to search one field or one file, follow this code on SQL: Select * from Syscolumns or Select * from Systables I believe the specific library for this is QSYS2 . Update to add directions with F.R.O.G. : Connect to your server. On the DB2 tab, choose File | New. In the middle pane, enter in your SQL statement. Select * from QSYS2

Error SQL0104 when creating a function in System i V7R1

為{幸葍}努か 提交于 2019-12-08 20:08:59
I'm creating a SQL function on System i V7R1: CREATE FUNCTION MYSCHEMA.GROUPDIBAS(v_code VARCHAR(50)) RETURNS VARCHAR(2048) LANGUAGE SQL BEGIN DECLARE str VARCHAR(2048); SET str = ''; FOR row AS ( SELECT FIELD2 FROM MYSCHEMA.DIBAS WHERE FIELD1 = v_code ) DO SET str = 'Bubi'; --I removed many statements to make clear the problem doesn't come from them END FOR; RETURN str; END ; I execute it with "Run SQL script" tool, which is part of the iSeries Navigator V7R1. It works on another V7R1 server (using iSeries Navigator V5R4), but not in that one where I'm working now. It fails with this message:

Using AS400 date in SSRS Report

百般思念 提交于 2019-12-08 12:15:56
问题 Running a SELECT against the AS400 using the IBMDA400 OleDb provider appears to return dates as string values, SSRS just laughs at you when you try and apply a date format to the field. I've tried a simple CAST in the SELECT to no avail. How can I get an actual DBTYPE_DBDATE struct back from the iSeries OleDb provider? I should mention that the dates in question are all being returned by a UDF with a type of DATE. IBM appears to map DATE type into a DBTYPE_STR OleDb type. 回答1: The field(s) in