Questions tagged [rpgle]

RPGLE is a high-level programming language (HLL) for business applications for programs running in the Integrated Language Environment (ILE). IBM is the creator of RPGLE. Use this tag for all questions about RPG IV and free format RPG. Use the RPG tag for questions about older versions of RPG and non-IBM variants of the language.

Filter by
Sorted by
Tagged with
-1 votes
1 answer
15 views

I need to display the hex value of a file field value in display file in a rpgle program

I need to read a file using RPGLE and then display the Hexadecimal value of some of the fields of the file in a display file. Can someone tell me how to get the hex value of a field in a rpgle program ...
Kunal Roy 's user avatar
0 votes
1 answer
50 views

How to endjob RGZPFM in AS400

I tried to run the Reorganize Physical File (RGZPFM) on one of the files. I executed it through a submitted job running in QBATCH. Due to it taking too long, I eventually decided to end the job ...
levi's user avatar
  • 1
0 votes
3 answers
91 views

Confirm behavior of %NULLIND

I have this RPG code that I have been trying to convert to Java, but I still don't understand how it is going to look like in Java. RPG Code: C EVAL %NULLIND(XXXXXXXX) = *OFF ...
KJ01's user avatar
  • 65
1 vote
1 answer
45 views

Using noxDB, ParseString fails, but ParseFile is successful with the same JSON

Using noxDB on the IBM i in an RPG program, ParseString fails, but ParseFile is successful with the same JSON. Please see the example below. Is ParseString unable to handle arrays? If so, is there a ...
Ray's user avatar
  • 11
0 votes
3 answers
77 views

How to get the number after the decimal position in RPGLE program

I have a PF in a rpgle program with a field having values 1001.123, 1001.234, 1001.561 and so on. I need to capture the number after the decimal position for doing some calculations. So I need to ...
Kunal Roy 's user avatar
0 votes
0 answers
62 views

strpccmd all of the sudden doesn't work anymore

We have a program with the next lines: // Editor voor blob opstarten @cmdString = 'STRPCO'; callp(e) excCmd(@CmdString :%len(@CmdString)); @cmdString = 'STRPCCMD PCCMD(' + '''' + 'CMD /C ...
jand66's user avatar
  • 1
0 votes
3 answers
56 views

How to filter the decimal place in SQL for IBM DB2 database running in IBM-I (as400)

I have a file (or table) suppose Table1 which consists of a numeric field Num1, the values of the field is like 1001.001, 1001.000, 1001.002 and so on . I want to write a SQL query which filters value ...
Kunal Roy 's user avatar
0 votes
1 answer
74 views

iSeries RPG/ILE parsing JSON

I am using RPG/ILE and Scott Klements's YAJL service program. I can not parse properly the boolean value. { name : "John", reserved: true } any help will be appreciated. Thank you. could not ...
eugb's user avatar
  • 1
1 vote
3 answers
93 views

How to get the list of binding directory attached to a rpgle program

Suppose I have a program RPG1, I have attached binding directory DIR1, DIR2 and DIR3 to it during compilation. These are not specified in the HSpec of the program. The program is now compiled. Now how ...
Kunal Roy 's user avatar
0 votes
2 answers
52 views

Why the IF condition gets FALSE even though the complete DS is blank?

Here's a test source where I need to ID and validate the (fixed) *blank positions in a fixed-len string, data. So here the first blank_string is of char(4) starting pos(2), and the second blank_string ...
ojay's user avatar
  • 103
1 vote
2 answers
106 views

How to fetch File Member & Library for which the trigger has been fired in SQL Trigger program in IBM ISeries DB2 SQL Trigger

I have a Multi member table and a SQL Trigger program is attached to it. Is there a way to fetch the File Member & Library for which the trigger has been fired in SQL trigger program? Basically I ...
OutLander's user avatar
0 votes
1 answer
44 views

Problem with RPG Prototype for java.io.File

I'm attempting to work with jsoup in RPGLE, but I don't know a lot about Java. I can't get past trying to create a java.io.File object to use in jsoup. I'm obviously doing something wrong, but I just ...
Rob Schember's user avatar
1 vote
1 answer
88 views

RPG **FREE : What is the equivalent free-form declaration for a LIKE definition with a relative size

DName+++++++++++ETDsFrom+++To/L+++IDc.Keywords+++++++++++++++++++++++++++++Comments++++++++++++ DQty S 11p 3 INZ(123.50) DQtyX ...
ojay's user avatar
  • 103
-1 votes
1 answer
58 views

CRTBNDRPG - Few clarifications regarding RPG Compiler Listing (SPLF)

Q1: On line 1, i know 5770WDS is Rational Development Studio for i and V7R3M0 is the OS version, what does 160422 and RN represents? Q2: Why DBGVIEW(*STMT) says '(Source not available.)' and isn't ...
ojay's user avatar
  • 103
0 votes
2 answers
74 views

Binary math in IBM i RPGLE

I am trying to decipher an old piece of code from RPGLE so that I can convert it to C#. Here is the code in question: D DS D S2DATE 1 6 0 ...
user3763812's user avatar
0 votes
1 answer
62 views

ACTGRP query on AS400

I have a query in regard to activation group. If I declare a program with DFTACTGRP(*NEW), the system creates an activation group for it and the activation group is destroyed after the program ends. ...
Kunal Roy 's user avatar
0 votes
2 answers
316 views

How to determine in a rpgle program if a file is locked or not?

Suppose , my program processes a file , but before processing the file, how can I check if the file is locked (I want to check this because I dont want the program to crash in case of a file lock). ...
Kunal Roy 's user avatar
1 vote
1 answer
66 views

Prototype not used in called RPGLE program , but the program still works

I have a program SS150R where the PI is declared as Dcl-pi SS150R; pCompcd Char(4); ptrncd Packed(3:0); pErrMsg Char(30) options(*nopass); ...
Kunal Roy 's user avatar
2 votes
1 answer
81 views

Impact analysis of changed service program RPGLE

I have a Nomain *MODULE object to which I added a new procedure. The *MODULE object is used to create a service program using a binder language source file which already exports a couple of other ...
Theju112's user avatar
  • 167
1 vote
2 answers
190 views

XML-INTO issue with RPGLE data structure

Working on a program to read XML to RPG for the first time. I'm not getting the data into my DS and when I try to view the subfields I get Identifier does not exist. This is part of the sample xml &...
Jody's user avatar
  • 11
0 votes
1 answer
124 views

Compiler directive not recognized

I get this error when start coding the C sheet of this RPGLE program : Compiler directive not recognized; directive ignored This is my code, in the last six lines I get the error. HDatedit(*ymd) ...
reymagnus's user avatar
  • 327
0 votes
1 answer
80 views

How to get URL parameters in RPG-based CGI script?

I am trying to find an API similar to QtmhGetEnv that allows me to read URL parameters in an RPG-based CGI script. Is there something like that available?
Kerim Güney's user avatar
  • 1,128
-1 votes
1 answer
82 views

Convert a DS from fixed to free form in RPGLE

I have the following data structure in an old program D P1PARM DS 256 D P1ADFR 1 15 D P1ADTO 16 30 D P1MSNR 31 37 0 D ...
Kunal Roy 's user avatar
1 vote
0 answers
33 views

NOXDB IBMI Webservice with Formdata

for the last week i'm trying to get an authentication key form the microsoft API. In postman this works. But when i try the same call in rpgle code, using NOXDB as json tool. i get following response ...
WouterV's user avatar
  • 133
2 votes
1 answer
306 views

One RPGLE calls another RPGLE program using a data structure, how to achieve this in free format

I have a calling program suppose program1 which calls program2 using a data structure. CALL 'Program2' PARM P1PARM The structure of P1PARM D P1PARM DS 256 ...
Kunal Roy 's user avatar
2 votes
3 answers
101 views

Is there a way to obtain the SQLSTT error description in RPGLE/DB2 SQL for more informative error messages?

I am running RPGLE/DB2 SQL and want to get the SQLSTT error description to send back to the user or developers to better describe what happened. Right now we have to google the SQLSTT description ...
Julie Krawczyk's user avatar
0 votes
1 answer
325 views

How to clear a physical file (CLRPFM) in a rpgle program when that program is using the file

I have a RPGLE program. It needs to process file FILE1 in input mode after all the data from file is read and processed it needs to clear the file FILE1. But when I am using QCMDEXE api to clear the ...
Kunal Roy 's user avatar
0 votes
1 answer
136 views

how does %lookup decides what search method to use

Statement below comes from this link: https://www.ibm.com/docs/en/i/7.4?topic=functions-lookupxx-look-up-array-element "The %LOOKUPxx built-in functions use a binary search for sequenced arrays (...
HockChai Lim's user avatar
  • 1,675
-1 votes
2 answers
282 views

Syntax errors in RPGLE program

I am creating a RPG program (In PUB400 server) that simulates an ATM cashier with some options. This RPG program uses three tables as: Customers(Id, Name, RegistrationDate), Accounts(AccountNumber, ...
reymagnus's user avatar
  • 327
0 votes
2 answers
155 views

Is there any way to scroll to the left/right of a screen in rpgle?

I am facing issue in adding more fields into the screen of RPGLE to the right hand side Don't have any idea how to do it.... suggest anything.
Aditya Kumar's user avatar
1 vote
2 answers
188 views

Multiple errors when compiling a RPG ILE program

I'm trying to copy code of a RPG ILE program same as in the video: https://www.youtube.com/watch?v=F2bS3kRpC8Q&list=PL34QvIMpkj1lOoWJuyx2BHbXwYC7llIpe (Minute 34:18) This is the code I wrote: H ...
reymagnus's user avatar
  • 327
-1 votes
5 answers
118 views

What is usually preferred in a sub-proc, INZ during variable declaration or using CLEAR? [closed]

Assuming both choices will yield same results, what choice do you usually make and why? dcl-proc test_proc ; ... dcl-s count int(5) inz ; ... // use count end-proc ; or dcl-proc ...
ojay's user avatar
  • 103
1 vote
1 answer
76 views

In ILE COBOL on IBM i, why am I receiving a pointer error in my SQLCBLLE *module that is part of a *srvpgm

I have an SQLCBLLE *MODULE that contains embedded sql. This *MODULE is part of a *SRVPGM. If I call this SQLCBLLE *MODULE from an SQLRPGLE pgm, I get a pointer error on the exec sql that does a select ...
corei's user avatar
  • 21
1 vote
1 answer
74 views

How do you create a COBOL *module with *nomain and list of exportable procedures

so in RPGLE, I use the following source members to create my *module procedures, that I can then compile into a *SRVPGM... binder source - exportable procedures that the *srvpgm can reference module ...
corei's user avatar
  • 21
1 vote
0 answers
63 views

Changing PdfPTable width from RPGLE using iText

I am trying to modify the width of a table inside a .pdf using using RPGLE. I would like to use the 'setWidthPercentage' method to adjust the table size but I can not get it to work in my RPGLE ...
Rich D's user avatar
  • 11
2 votes
1 answer
105 views

Separated Character Generation convert from IBM i series (AS400) to Java text file

I'm trying to create an "XLS" file, but it will be available as a txt file. (It means when you right click and select open with in windows and choose notepad it will show as tab separated ...
EthanP's user avatar
  • 55
2 votes
1 answer
100 views

Create Java file with special hidden (non-printable and invisible?) characters of IBM I series (AS400) problem

I'm trying to create an "XLS" file, but it will be available as txt file. (It means when you right click and select open with in windows and choose notepad it will show as tab separated file)...
EthanP's user avatar
  • 55
2 votes
3 answers
203 views

RPGLE data structure features?

I am playing with RPGLE data structure features. We store 5 Clerks and 5 Managers in a data area. then we want to bring them into and RPG program and chop them into two strings suitable fore SQL ...
user2972041's user avatar
3 votes
2 answers
177 views

Why the OPTIONS(*TRIM) doesn't work as IBM says, what's missing here?

**free ctl-opt main(main); dcl-pr main ExtPgm('TSTPGM'); *n char(10) const options(*trim); *n char(10) const options(*trim); end-pr; dcl-pr ExecCmd Extpgm('QCMDEXC'); Command Char(40); ...
ojay's user avatar
  • 103
0 votes
0 answers
696 views

how to solve Error message I/O Error CPF5129 in RPGLE?

please help, we are having a problem with a RPG program Message . . . . : I/O is not allowed because the program device or My LF member in my library is in error. Cause . . . . . : An input/output (I/...
AHY's user avatar
  • 1
-1 votes
4 answers
198 views

CRTSQLCI v RUNSQLSTM

I am running this on OS 7.4. CREATE PROCEDURE MYLIB.MYSQLPROCEDURE1(PARM1 IN INT) LANGUAGE SQL SPECIFIC MYQ001 ...
jemrug's user avatar
  • 89
0 votes
1 answer
157 views

change program attribute in Aldon

I have a program defined to have attribute type RPGLE in Aldon. Is there any option to change this to SQLRPGLE ? I have gone through the various options in the green screen version and also the LMi ...
Theju112's user avatar
  • 167
0 votes
1 answer
79 views

How to create multiple user library lists filter in VS Code for IBM i development

we work in multiple envts(different library list) in AS400/IBMi system. Each envt has its own set of default libraries on same IBM i system. We are trying to utilize VS code for IBMi development and ...
Digvijay's user avatar
0 votes
2 answers
80 views

Trigger to PostgreSQL JDBC writes successfuly first time, fails after

I have a project for sending data from DB2 on an IBM system over to a PostgreSQL server on a RHEL system. I am using a trigger that sends information to a data queue, which then gets read and sent ...
TheLittlePeace's user avatar
1 vote
1 answer
332 views

Session or device error occurred in file AS400/IBM i

I am learning IBM i RPG programming and am stuck on displaying a subfile. I keep getting the error "Session or device error occurred in file". That is supposed to happen in scenarios such as ...
Peter1's user avatar
  • 157
-1 votes
1 answer
59 views

Need any or IBMi API to validate address existence

I am in search of an IBMi API that could validate existence of an address, I am not sure if there is any native IBMi API that can do this, since all my search has exhausted. I tried looking at ...
mrsorrted's user avatar
  • 141
1 vote
2 answers
137 views

Possible way of overloading functions or prototypes with different return data types RPGLE

I have a procedure that returns a data type of char/packed/date based on the input parameters. I was thinking of possible ways to use overload, but IBM doesn't allowed overloading of prototypes that ...
wazxela2's user avatar
-1 votes
1 answer
69 views

KD_raj185 rpgle code in as400 try this please

an assignment operator is expected with the eval operation a semi colon is not specified at the end of a free format statement the name or indicator is not defined the compiler cannot determine how ...
pannem srujana's user avatar
1 vote
1 answer
132 views

Problem with a fixed column RPGLE program

I'm having trouble with program maintenance on an older program that I don't fully understand. The program in question is building a file with a generated name to send to a remote FTP server. The ...
jaspoe30's user avatar
0 votes
1 answer
1k views

How to find files program is using in the AS400

I am trying to find the file a program is using so I can write a query using its fields. How would I look at the programs files to see what it is using? I have tried looking for the file using infor ...
Le_Me's user avatar
  • 43

1
2 3 4 5
14