rpgle

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

Using cursor for multiple search conditions

故事扮演 提交于 2019-12-12 10:27:35
问题 To begin with I want to apologise for my bad english and it's possible that I miss some crucial information for you guys. Anyways. I am developing a display file with a subfile to show some records. It works like a charm when showing one select but now i want to develop a search-function for the users. So when the user enters different search-conditions the select will change and the cursor must somehow update with the new select. I am ripping my hair off, I really can't get this to work. I

AS400 RPGLE/free dynamic variables in operations

别说谁变了你拦得住时间么 提交于 2019-12-12 03:49:10
问题 I'm fairly certain after years of searching that this is not possible, but I'll ask anyway. The question is whether it's possible to use a dynamic variable in an operation when you don't know the field name. For example, I have a data structure that contains a few hundred fields. The operator selects one of those fields and the program needs to know what data resides in the field from the data structure passed. So we'll say that there are 100 fields, and field50 is what the operator chose to

SQL injection - no danger on stored procedure call (on iSeries)?

自作多情 提交于 2019-12-11 15:03:26
问题 I've done some searching around but I have a specific question on SQL Injection and hope I can get some input as I believe I may be getting the wrong end of the stick to do with field data sanitising etc :- I have a java program calling a stored procedure on an iSeries. The stored procedure has CL / RPG code behind the scenes. The stored procedure is called by way of parameters with the data coming from a web page. For example the call would look like the following:- call library.prog(

How to prevent user from entering special characters (like symbols not visible in keyboard) in a text field (Character type)?

风格不统一 提交于 2019-12-11 09:04:44
问题 How to prevent user from entering special characters (like symbols not visible in keyboard) in a text field (Character type) in AS400 ?? Visibly most of the time there is no issue for iseries/as400 in accepting it and saving it into the file but sometimes when the data is handled in downstream reporting system it get rejected with different error in their system. Is there a way to prevent from the entry point itself ? eg: In Address field of a Customer, end user copy paste (ctrl + c ctrl + v

Procedure pointers in RPGLE (PROCPTR)

北城余情 提交于 2019-12-11 07:45:55
问题 Can anyone provide any interesting usage examples of these? 回答1: jjujuma, For a trivial example you could use this to implement some Object Oriented style procedure like Draw. You'd call a Circle_Draw procedure for a Circle or a Square_Draw procedure for a Square by assigning the appropriate %PADDR of the Circle_Draw or Square_Draw to your Draw procedure pointer. When calling the Draw procedure pointer you hide which procedure (Circle_Draw or Square_Draw) you're calling. 回答2: For a practical

How can I read the liblist from within an ILE-Program? (preferably RPG or CL)

我的未来我决定 提交于 2019-12-10 21:20:48
问题 We control on what objects our programs on the as400 work, by running them with different liblists. But some operations cannot be directly controlled by this. Therefore, my program needs to read the liblist and decide on some of the libraries in it, how to act. I could not find any api to read the liblist entries from within a program. What I would expect, is some kind of api that lets me iterate through the liblist entries by priority or gives me an array with them in the order given by the

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

Invoking AS400 RPG From Java

心不动则不痛 提交于 2019-11-29 09:01:06
I have a very limitied (0) knowledge on AS400 and RPG. But we have a urgent requirement where we need to invoke a RPG program from a java class. So I found that we can achieve it through JTOpen. But I am stuck at declaring the ProgramParameter list. I have the following information about RPG Program Program name: ZM30000R Parameters: Branch 7,0 (Numeric) Account type 2 (01-cheque,02 savings) Account Number 20 (character) Error code 7 (character) DR/CR indicater 1 (character D,C) But no clue about what is the intput and output .How to declare the ProgramParameter. I have done as below. I cannot

Accessing RPG on iSeries from Java

|▌冷眼眸甩不掉的悲伤 提交于 2019-11-29 04:55:57
Has anyone had good experiences of talking direct to RPG programs running on a V5R4 iSeries machine from Java? If so, what are the recommendations of the community, and what pitfalls should I try to avoid? From the various pieces of literature and spike solutions I have attempted it looks as though we can use ProgramCallBeans (either through PCML or xPCML), talking to the DataQueues (for asynchronous comms), or even JNI. I'm looking for something that's robust, performant, quick to develop, easy to maintain, and easy to test (aren't we all!?!). I suggest using IBM's Java Toolbox for Java. Put