RPGLE Questions


SQLCOD = -7008 when doing an insert into file using SQLRPGLE
Hi, I’m trying to insert selective records from one file into the same file in another library. I have to do this for many file. Am building the query dynamically using SQLRPGLE. Am using a PREPARE statement and an EXECUTE statement to run the query. While the PREPARE statement ends fine, am getting an SQLCOD [...]

Answer Question   |  January 29, 2010  12:44 PM
Application development, AS/400, Backup & recovery, CLP, DB2 Universal Database, RPG, RPGLE
asked by:
0 pts.

DDS
Is there any way (field attribute, key word, etc.) to keep the beloved end user from not using the field exit key when entering a value in a numeric field ?? We have users who will continually use the tab key or just hit enter when entering a 1 (for example) in a field, thereby [...]

Answer Question   |  July 10, 2006  11:38 AM
Application development, AS/400, RPG, RPGLE
asked by:
5 pts.

Problems in a self refreshing subfile
I created a self refreshing subfile in rpg using data queue. Consider the scenario where i am typing a text on the screen and at that time some data arrives at the data queue. The control will come back to the program and process the record. All the text i have typed will be gone. [...]

Answer Question   |  July 2, 2006  4:49 AM
RPG, RPGLE
asked by:
0 pts.

folders and documents
Is there a way for a program to find out if a folder contains any documents (we will not know a document name). We need to know if the folder is empty or if it contains any documents.

Answer Question   |  December 10, 2009  4:30 PM
Application development, AS/400, CLP, RPGLE
asked by:
40 pts.

Data mapping errors when reading records with time fields…
I’m trying to access records from a file that has eight fields defined with the time attibute. When I examine the data held in these fields they are mostly set to *LOVAL i.e. 00.00.00 in *ISO format which according to the RPGLE reference manual is an allowable value. However, when my program attempts to read [...]

Answer Question   |  November 22, 2010  9:51 AM
Application development, DB2 Universal Database, RPGLE
asked by:
0 pts.

CR/LF
I am loading a flat file in an RPGLE program. The file will be downloaded to a server and converted to .txt and .dbf. The receipient, a benefits provider, states in the file specifications that their must be a carriage return/linefeed at the end of each record. Can you provide some direction on how to [...]

Answer Question   |  December 10, 2009  10:45 AM
RPGLE
asked by:
0 pts.

Extracting details from timestamps…
I have a timestamp field from which I need to extract the date portion into a packed(7,0) field in *cymd format and the time portion into a packed(6,0) field in *hms format. We’re running V5R3. What is the neatest way to achieve this?

Answer Question   |  November 21, 2010  6:54 AM
RPGLE
asked by:
0 pts.

Message Id RNX0105…
I have a program written in free format RPGLE that is executed as a called procedure from within a CLLE program. It has one parameter of char(1). When this program gets exectued I’m getting the RNX0105 error message which states “A character representation of a numeric value is in error.” before a single line of [...]

Answer Question   |  December 10, 2009  9:25 AM
AS/400, RPGLE
asked by:
0 pts.

Send Commands between two ISeries Machines
Is there a way to send commands between two ISeries to call programs and responses to eachother. What I am trying to figure is how to call a program on another machine, and also send data to that machine that it needs to process. What we have is our main system and a backup system. [...]

Answer Question   |  December 10, 2009  4:32 PM
DataCenter, RPGLE
asked by:
0 pts.

Legal size output thru a printfile in a RPG program
how to print legal size output from RPG programs.

Answer Question   |  June 14, 2006  12:51 PM
Application development, Printing, RPGLE
asked by:
0 pts.

commitment control and activation grp in ILE
I am new to AS/400, can you a link or resource that talks about commitment contrl and activation group briefly.

Answer Question   |  December 10, 2009  11:12 AM
RPGLE
asked by:
0 pts.

How can I affect the user profile previous sign-on date with out sign on interactive.
We have a windows system for invoices from our suppliers. To exchanges files the system map to a folders in I-series IFS-system. We have a special user profile for the system to use. The system map to I-serie and every thing is ok all the servers stays up day and night. The problem is after [...]

Answer Question   |  December 8, 2009  9:41 AM
AS/400, DataCenter, Desktops, Management, Microsoft Windows, OS, RPGLE, Security, Servers, SQL Server, Tech support
asked by:
0 pts.

Hex representation for position cursor
Does anyone know the hex representation for the display attribute Position Cursor (dspatr(PC))?

Answer Question   |  December 8, 2009  9:04 AM
Application development, AS/400, RPGLE
asked by:
40 pts.

QUERIES
I will be upgrading our software soon. All library names will be changing and we have tons of queries. Is there a way to automatically change the library names in my queries without having to go into each individual query separately?

Answer Question   |  December 8, 2009  2:16 PM
AS/400, CLP, RPG, RPGLE
asked by:
165 pts.

Odd RPGLE Multiplication issue
I have a RPGLE program that traverses through a bill of materials to do a cost roll up. Part of the code multiplies several quantities together to get the quantity needed at that level. The multiplication is not yielding the correct answer and I?m not sure why. Below is a small sample program that illustrates [...]

Answer Question   |  December 8, 2009  12:09 PM
Application development, RPGLE
asked by:
0 pts.

Year in Date or Timestamp value is not in the correct range (C G D F).
Hi All, I am getting the above error when trying to write the control format of a subfile. The DDS is coded as follows: A O_ESD L O 9 70DATFMT(*MDY) A MAPVAL((’01/01/40′ *BLANK)) Not too sure what the MAPVAL will do as I dont think it can ever be blank. Basically in the compile listing [...]

Answer Question   |  June 2, 2006  3:20 PM
Application development, AS/400, CLP, DB2 Universal Database, RPG, RPGLE
asked by:
0 pts.

Program Described File in RPGIV
Can any one send me an Example, How a Program Described File is used in RPGIV?

Answer Question   |  December 7, 2009  8:57 AM
RPG, RPGLE
asked by:
0 pts.

H Spec
Dear All !! Q1. Can we define the compile option – debugging view (DBGVIEW) = *all in H spec ??? If yes, please let me know the syntax. Q2. How do we retrieve system date in RPG or RPG IV ? [Note : *date or Udate retrieves the job date] Thanks and regards, Kalpesh

Answer Question   |  November 23, 2010  7:22 AM
RPGLE
asked by:
5 pts.

Detecting FTP errors
Hi! I have a program that reads an FTP log and sends the user a message if there’s an error (4xx or 5xx). But there are some errors that do not indicate which is the error code (like connection errors). How can I capture these errors? Thanx in advance. Meli

Answer Question   |  May 16, 2006  10:47 AM
CLP, RPGLE
asked by:
20 pts.

The Right DDS Combination
Hi All, I have been spinning my wheels and was hoping for help. I have a subfile where an option calls another RPG program that displays a window for data capture. When the user takes the same option against multiple records in the subfile the window appears the first time overlaying the subfile screen, but [...]

Answer Question   |  May 16, 2006  5:27 PM
AS/400, Printing, RPG, RPGLE
asked by:
0 pts.