ibm-midrange

Subversion for iSeries

扶醉桌前 提交于 2019-12-14 00:40:23
问题 We need info about Subversion for iSeries (OpenSource version). Has anyone used it for production systems? Thanks, Sam 回答1: Sam, How are you planning to use it? If you want to connect WDSC or RDi to it for project management then that could work. Unfortunately if you want to use it on the green screen it may not do it for you since iSeries source code is stored in database files typically rather than text files in the IFS. All that SoftLanding has done is port it, not add any additional

How can I create a DTAQ in one of two different libs, controlled by the jobs liblist?

倖福魔咒の 提交于 2019-12-13 19:29:52
问题 On our as/400 we have a test environment and a productive environment. Once we tested our programs are working, we can put them in the productive environment. Both environments contain a similiar set of libraries. The basic mechanism to tell our programs, in which environment they work, are liblists used for the jobs they run in. That works great, for some things, but for others it doesn't. Therefore we often have a parameter passed to the programs on job submission, that tells the program to

db2_execute returns “Describe Param Failed” and “Binding Error”

谁都会走 提交于 2019-12-13 19:12:42
问题 I'm running the following query using PHP's db2_prepare and db2_execute (schema names have been changed to protect the innocent): WITH U AS ( SELECT * FROM FOO.USR WHERE USR_ID = ? ), UC AS ( SELECT UC.* FROM FOO.USR_CNTRCT UC JOIN U ON U.USR_ID = UC.USR_ID ) , LC AS ( SELECT DISTINCT CNTRCT_ID FROM FOO.CNTRCT_LOC CL JOIN FOO.USR_LOC UL ON UL.SLS_CTR_CD = CL.SLS_CTR_CD JOIN U ON U.USR_ID = UL.USR_ID WHERE CL.SLS_CTR_CD IN (?,?,?,?) ) SELECT C.*, COALESCE(P.PGM_NM, CAST('' AS CHAR(80) CCSID 37

AS400 RPG DSPF Character Level Color Change

僤鯓⒐⒋嵵緔 提交于 2019-12-13 06:54:03
问题 I want to change the color of individual characters in a field in a subfile. SCOTT LAWRENCE JOHN SMITH I like to show CO in SCOTT as RED color and MI in SMITH in RED color and all other character is GREEN. Can this be achieved ? I am having hard to finding a DSPATR at the individual character level instead of field level in the DSPF. Basically, I want to show characters in a field having values CO and MI in a subfile in a different color. 回答1: The only way, in 5250 display to show CO in SCOTT

Ruby On Rails Returning Array NoMethodError

烈酒焚心 提交于 2019-12-13 05:45:53
问题 We've been continuously working on this issue for a few months and not getting far with it. Since this was first asked, we changed the code (based on what the original developer for the site suggested), but we are still not getting where we need to be. I'm relatively new to Ruby and am currently taking some courses to learn more about it, so please bear with me. We're using Ruby 1.9 and Rails 3.2 We use AS 400/DB2 for our database. We have an online ordering site that you have to have an

DB2/400 Alternative to Opening a Cursor

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-13 01:08:09
问题 I'm running DB2 for i, V7R2 TR3. I was told opening a cursor provides a lot of overhead and should be avoided whenever possible. From what I've read, using EXECUTE INTO var1 USING var2 is an alternative, but I can't get it working. I am getting a SQL0104 error. This is my Stored Procedure: BEGIN DECLARE STMT1 VARCHAR ( 500 ) ; SET STMT1 = 'SELECT SUBSTR (''' || TRIM(ITEM) || ''' , ( LENGTH ( TRIM ( PREFIX ) ) + 1 ) , ( 20 - LENGTH ( TRIM ( PREFIX ) ) ) ) ' || 'FROM MYLIB.MYTABLE ' || 'WHERE

How to determine the CCSID used in CPYFRMIMPF command?

孤街醉人 提交于 2019-12-12 21:15:51
问题 I am trying to copy an IFS stream file to a AS400 data file, but with the default CCSID setting the data copied ended up as some strange characters. Using cat command under QSH can display the content of the stream file correctly so I suspect that this has something to do with the CCSID. My question is how to determine what is the correct CCSID to use in my case? 回答1: Check the source and destination file CCSID's. The -S option to ls from qsh will identify the IFS file CCSID. DSPFD will

How do I cast a decimal field to a date field in DB2 AS/400?

谁说我不能喝 提交于 2019-12-12 19:40:14
问题 I have a DECIMAL field which contains a date in the AS400 format: 1100614 I have tried: cast (MYDATE as DATE) but I can't cast a DECIMAL to DATE, whereas DATE(MYDATE) returns null. How do I cast this field in a DATE field? 回答1: Assuming it is CYYMMDD like I asked in my comment above, here are a couple options: Convert CYYMMDD format to datetime - SQL convert cyymmdd (AS400) format to datetime format It can be done, but it isn't easy. If you need to do this often, it may be worth your time

Get rows affected by an update

时光总嘲笑我的痴心妄想 提交于 2019-12-12 18:36:33
问题 How can you get the exact rows affected by an SQL UPDATE statement in DB2 on AS400 ? It's very usefull to see which are the rows just updated, even more during tests. I saw this question: is the same, but specific for MySQL. Is there a standard SQL way or DB2 specific way for doing this? I saw also this technique, but I can't use it because my update query is too much complicated. An additional feature could be: getting also previous version of these rows , so you can compare it with the

Is it possible to use external indicator to activate display attribute in display file?

删除回忆录丶 提交于 2019-12-12 17:15:09
问题 I am currently amending an existing RPG program. The aim is to set on an indicator so that this indicator will activate the display attribute ND in a display file to hide a field. The problem is that all the general purpose indicators IN01~IN99 have been used up, and I cannot reuse any of them without disturbing the existing program flow. Is it possible to use external indicator U1~U8 instead? If not possible is there any other alternative? Or am I just screwed? 回答1: Consider using a program