Questions tagged [rpg]

DO NOT use this tag for Role Playing Games!! RPG (Report Program Generator) is a high-level programming language (HLL) for business applications. IBM is the creator and primary vendor of RPG, but the language is available from other mainframe and microcomputer manufacturers, including Unisys. Use this tag for older non-ILE versions of RPG from IBM and for non-IBM variants of the language.

280 questions
2
votes
1 answer

Retrieving names of data structure fields

i want to retrieve the field names of a data structure. Is that possible? My plan is to write a toString() procedure to dump a given data structure. For example i could print all field names and values of the ds as JSON.
bensen
  • 47
  • 4
2
votes
1 answer

Error java.io.FileNotFoundException sending an email RPGLE/Java

I'm developing a class that uses javax.mail which simply receives some parameters from my AS400 RPGLE program and sends an email that contains a Subject, Body and an Attachment. In the parameters I'm passing the path of a server (ex:…
Henrique
  • 131
  • 1
  • 6
2
votes
1 answer

Rounding in AS400/RPG vs Rounding in Java

I'm trying to convert some AS400/RPG code into Java. I was able to find an example online that mirrored what I am seeing in the code: d elevensix s 11 6 inz(26285.88991) d seventwo s 7 2 c…
Gedalya
  • 899
  • 4
  • 16
  • 28
2
votes
3 answers

How to subdivide the contents of a string variable based on a certain symbol in the content of the variable in RPGLE

Suppose I have a string variable in RPGLE . The content of the variable is "Hi;this;is;Kunal;Roy". How do I split the contents of the string based on the symbol ; I want to have the values Hi , this, is , Kunal , Roy separated and stored in some…
Kunal Roy
  • 729
  • 3
  • 11
2
votes
1 answer

Calling an AS400 RPG program from JAVA

I am trying to call an RPG Logon program on an AS400 system from JAVA. The issue is whenever I give incorrect parameters, I get a response, such as user ID is incorrect, password is incorrect. When I give an incorrect path to the program, I do get…
Bazooka
  • 29
  • 1
  • 4
2
votes
2 answers

Encode characters into character entities for XML

I have a variable defined as: D content 1280A CONST I need to find the ", &, ', <, > characters and replace them with: ", &, ', <, and > respectively. I've seen some XML functions in the language but these…
Quaternion
  • 10,380
  • 6
  • 51
  • 102
2
votes
1 answer

Is there an Automated Acceptance Testing Software or Tool for RPG?

I have been seeking up tools for automated acceptance testing for RPG to use techniques like ATDD and BDD but I haven't found anything yet, the closer I have found is RPGUnit but it's only for unit testing, if you could give some documentation about…
Daniel F Jaramillo
  • 413
  • 1
  • 5
  • 12
2
votes
3 answers

as/400: other way for display graphics?

I'm aware of the existence of DDS files which allow programming of display graphics on the as/400, but is there another way? Specifically, what I want to do is manipulate the terminal buffer directly to be able to display anything else than just…
aganm
  • 1,245
  • 1
  • 11
  • 30
2
votes
3 answers

AS400 files - convert PF and LF to SQL

I'm working in a IBM environment, specifically with AS400 machines and DB2 databases. My next task is converting every possible file from PF and LF, to SQL (for instance, CREATE TABLE... and CREATE VIEW...). Are there cases when I can't do that? I…
LppEdd
  • 20,274
  • 11
  • 84
  • 139
2
votes
1 answer

SQL FETCH, Cursors and RPG

I am not sure what is wrong with my code, I am trying to make a while loop that will fetch the next characters in the field (code) with a cursor that is declared in SQL. The goal is to get the next matching characters with the loop. Then I want…
user1678980
2
votes
2 answers

Simulate local file specifications in RPGLE subprocedure

I'm very excited about the new "local F specs" coming in V6R1 - see: http://www.mcpressonline.com/programming/rpg/v6r1-rpg-enhancements.html Does anyone know a way to simulate this in V5R4 in a SRVPGM procedure?
3jjqwer
2
votes
1 answer

Add my own rules in SonarQube with RPG

I want to create my own SonarQube Plugin for the RPG language. I have the following problem. I start by created the RpgLanguage class that extends to AbstractLanguage. In this class, I defined my new language "Rpg". You can see my class in the…
MickKOZA74
  • 51
  • 7
2
votes
1 answer

How to use %Replace function in RPG code?

i was wondering if i could get some examples of the %replace function being used in rpg. My 4th edition programming in rpg IV book just briefly explains this which is leaving me very confused. Im trying to use this function to mask out the first 5…
MotoTurbo
  • 23
  • 5
2
votes
1 answer

What are Tips and tricks for an integration with RPG on AS/400?

I want to ask some information to tamtamy community to address an architectural choice. I work on a telecommunication suite, this is based on a proprietary development platform JEE7 oriented (now named, DP). In the requirements analisys phase, a…
m.genova
  • 377
  • 6
  • 15
2
votes
1 answer

Call procedure (long name) into variable (not free)

I'm trying to call a procedure and assign a variable with the output. My problem is that my procedure name is to long for the allowed space: This is my working source, is it posible to use move or movel and do the same? c eval …
Andreas Louv
  • 46,145
  • 13
  • 104
  • 123