Flat file
How to copy records from a file to flat file in RPG III
Answer Question
| September 9, 2009 11:33 AM
Flat files, RPG, RPG Flat Files, RPG III
How to copy records from a file to flat file in RPG III
Stored Procedure
hi, I’m calling a Stored procedure from RPGLEV program. I’m getting error pointer not set for location referenced. the SP has 3 parameters, numeric, numeric, Character my call stmt is CallP SP_Prototype(num1:num2:Char1) the program crahses….any thoughts???? thanks, NG
Answer Question
| September 9, 2009 8:32 PM
AS/400, AS/400 development, RPG
hi, I’m calling a Stored procedure from RPGLEV program. I’m getting error pointer not set for location referenced. the SP has 3 parameters, numeric, numeric, Character my call stmt is CallP SP_Prototype(num1:num2:Char1) the program crahses….any thoughts???? thanks, NG
Defining a sort variable (ORDER by) in RPG SQL
I have a file that I would like to sort on a specific column that a user would choose. I sort the file by an imbedded SQL statement: ORDER by PRDNO. Works fine. If I try and make it a variable (ORDER by :Sort_Seq), the statement is ignored. Is there a way to make the [...]
Answer Question
| September 22, 2009 2:12 PM
RPG, RPGSQL, SQL, V5R4, V5R4M0
I have a file that I would like to sort on a specific column that a user would choose. I sort the file by an imbedded SQL statement: ORDER by PRDNO. Works fine. If I try and make it a variable (ORDER by :Sort_Seq), the statement is ignored. Is there a way to make the [...]
Number of lines of code in a program
hi, I’ve 50 programs to find the number of lines of code in it… is there any smart way? Thanks, N.
Answer Question
| September 4, 2009 9:50 PM
AS/400, RPG
hi, I’ve 50 programs to find the number of lines of code in it… is there any smart way? Thanks, N.
How to convert RPG to a .txt file
How do you take a regular source member and convert it a .txt file?
Answer Question
| September 3, 2009 9:38 PM
RPG, RPG to .txt file
How do you take a regular source member and convert it a .txt file?
SNDUSRMSG equivalent in RPG (including VALUES and DFT)
Some time ago I found a piece of code by Scott Klemens regarding the implementation of SNDUSRMSG in RPG using QMHSNDM and QMHRCVPM. I need to do the exact same thing, however I also need to pass the values for the VALUES and DFT keywords used with SNDUSRMSG. Does anybody have an idea on how [...]
Answer Question
| April 20, 2010 1:19 PM
API, AS/400, CL, iSeries, RPG, SNDUSRMSG
Some time ago I found a piece of code by Scott Klemens regarding the implementation of SNDUSRMSG in RPG using QMHSNDM and QMHRCVPM. I need to do the exact same thing, however I also need to pass the values for the VALUES and DFT keywords used with SNDUSRMSG. Does anybody have an idea on how [...]
RPG Logic Cycle ?
HI, How to know that a RPG program using RPG Logic Cycle or Not? Jayanta
Answer Question
| August 21, 2009 6:37 AM
RPG, RPG Logic Cycle, RPG logical operators
HI, How to know that a RPG program using RPG Logic Cycle or Not? Jayanta
Logical File without Keyfield
If i am using a logical file without key fields in RPG program , it will show any error ? Jayanta
Answer Question
| October 12, 2009 10:08 AM
Logical Files, RPG
If i am using a logical file without key fields in RPG program , it will show any error ? Jayanta
Serialization: Mutexes vs. Semaphores
I am looking for a way to serialize access to a RPG program across multiple jobs. I have been doing some research on mutexes and semaphores and I am wondering what the advantages/disadvantages of each are. Also if there are any other ways to accomplish this. Thanks in advance for your reply
Answer Question
| October 12, 2009 1:22 PM
iSeries, Mutex, RPG, Semaphore
I am looking for a way to serialize access to a RPG program across multiple jobs. I have been doing some research on mutexes and semaphores and I am wondering what the advantages/disadvantages of each are. Also if there are any other ways to accomplish this. Thanks in advance for your reply
Scrolling Message in RPGLE
Does anyone know how to create a scolling message on the bottom of a display screen? I am programming on the AS400 in RPGLE
Answer Question
| August 19, 2009 9:22 PM
Display File, RPG, RPG ILE, RPG/400, RPGLE
Does anyone know how to create a scolling message on the bottom of a display screen? I am programming on the AS400 in RPGLE
Get user id in CGI RPG program
Please, kindly advise on this issue I am having. Program is coded in RPG and is a CGI module. I tried to get user-id from program data structure, but this “UserID 254 263″, but it shows QTMHHTTP, because this pgr runs on HTTP server. How else can I obtain real user-id of the user who [...]
Answer Question
| August 14, 2009 6:31 PM
CGI, Java, RPG, RPGLE
Please, kindly advise on this issue I am having. Program is coded in RPG and is a CGI module. I tried to get user-id from program data structure, but this “UserID 254 263″, but it shows QTMHHTTP, because this pgr runs on HTTP server. How else can I obtain real user-id of the user who [...]
Empty Date Type Variable
What does a *ISO Date type variable contain if it is not populated? It is not *Zero or *Null???
Answer Question
| August 12, 2009 10:10 AM
RPG, RPG IV, RPG Programming
What does a *ISO Date type variable contain if it is not populated? It is not *Zero or *Null???
RPG ILE Day of Week
Are there alternate ways to determine the day of the week. I have the following formula - DayOfWeek = %Subst((‘Sunday ‘ ‘Monday ‘ ‘Tuesday ‘ ‘Wednesday’ ‘Thursday ‘ ‘Friday ‘ ‘Saturday ‘ ):(((%Rem(%Diff(%Date():%Date(’1941-12-07′):*D):7)+1)*9))-8:9);
Answer Question
| August 13, 2009 6:56 PM
AS/400, RPG, RPGILE
Are there alternate ways to determine the day of the week. I have the following formula - DayOfWeek = %Subst((‘Sunday ‘ ‘Monday ‘ ‘Tuesday ‘ ‘Wednesday’ ‘Thursday ‘ ‘Friday ‘ ‘Saturday ‘ ):(((%Rem(%Diff(%Date():%Date(’1941-12-07′):*D):7)+1)*9))-8:9);
Date Formatting in RPG
I have a date in a DATE type field in *ISO format (ccyy-mm-dd) However, I want to extract the YY portion. Using %SUBDT(field: *Y) returns CCYY. Is there a nice way of doing this without using a data structure?
Answer Question
| August 13, 2009 10:22 AM
RPG, RPG IV, RPG Programming
I have a date in a DATE type field in *ISO format (ccyy-mm-dd) However, I want to extract the YY portion. Using %SUBDT(field: *Y) returns CCYY. Is there a nice way of doing this without using a data structure?
PGM described update file
Hi, I’m trying to update a program described file. I have tried setting the F specs up to allow processing by key by placing the following information in the noted locations: 07-14: file name 15: “U” 16: “F” 19: “F” 26-27: File length (32) 30: The length of the key (8) 31: “A” 32: “I” [...]
Answer Question
| August 11, 2009 9:15 PM
PGM, PGM described file, RPG
Hi, I’m trying to update a program described file. I have tried setting the F specs up to allow processing by key by placing the following information in the noted locations: 07-14: file name 15: “U” 16: “F” 19: “F” 26-27: File length (32) 30: The length of the key (8) 31: “A” 32: “I” [...]
RPG IV Date Formatting
What is the best and cleanest way to convert a character date dd / mm / yy to *ISO format?
Answer Question
| August 7, 2009 12:49 PM
RPG, RPG Date Formatting, RPG IV
What is the best and cleanest way to convert a character date dd / mm / yy to *ISO format?
HELP — RPG 400 LOCAL DATA (LDA)
Can i usr tow lda (local data area) in one CL program that calls an RPG program? if so please help with code illustations thanx
Answer Question
| July 31, 2009 8:54 PM
RPG, RPG/400
Can i usr tow lda (local data area) in one CL program that calls an RPG program? if so please help with code illustations thanx
RPG/400 – Reduce Manual Intervention
Currently when we run EOD we have to wait for the other system’s file. If the file did not arrive after some time, I will prompt message for operator to reply the message when the file is ready. How do I split my job so that we can use control M to submit the job [...]
Answer Question
| July 31, 2009 7:33 AM
EOD process, RPG, RPG/400
Currently when we run EOD we have to wait for the other system’s file. If the file did not arrive after some time, I will prompt message for operator to reply the message when the file is ready. How do I split my job so that we can use control M to submit the job [...]
SQL in CLP
Hi, I have to create a command that permits a user to copy records from one file to another and then remove those records from the first file. We’ve been doing it all manually using CPYF and INCREL and then deleting the records using an SQL Delete statement. I got the idea to create a [...]
Answer Question
| January 28, 2011 2:05 PM
RPG, SQL
Hi, I have to create a command that permits a user to copy records from one file to another and then remove those records from the first file. We’ve been doing it all manually using CPYF and INCREL and then deleting the records using an SQL Delete statement. I got the idea to create a [...]
Remove hard coding AS/400 RPG
Hi, I have a program that will be used in different countries. Each country have different selection criteria. How do I design my program such that I do not hard code the selection criteria? Note: Selection criteria could be more than 1 fields or from more than 1 file.
Answer Question
| August 6, 2009 6:48 AM
Hard Coding Solution - AS400 RPG, RPG
Hi, I have a program that will be used in different countries. Each country have different selection criteria. How do I design my program such that I do not hard code the selection criteria? Note: Selection criteria could be more than 1 fields or from more than 1 file.





