• Like in SQLRPGLE

    Hi, I am using the below query in SQLRPGLE Select count(data) into :cntrec from sample where data like '%' "+:tpnumber+" '%'. I am getting an error "Token "+:tpnmber+" was not valid" . The tpnumber is a character field(10a). Sample file is a flat file I even tried '%' +:tpnumber+" '%' and '%'...

    Prashanth123255 pointsBadges:
  • Base compiler program in SQLRPGLE

    I'm writing a compiler program in SQLRPGLE that will be used in a lot of programs that will run throughout my system. Obviously, I want to get it right so that I don't have a bunch of problems down the road, and right now it doesn't work.  Could you take a look at what I'm trying to do and suggest...

    ITKE409,400 pointsBadges:
  • Source size limit in SQLRPGLE

    I've been having some problems compiling a 25,000 line program and I'm figuring that a line limit is causing all of my errors. Is there a limit to what the SQL pre-complier can handle for a SQLRPGLE source object?

    ITKE409,400 pointsBadges:
  • SQL Syntax issue via Free-Form RPGLE

    I'm having difficulty with a select statement.  As below, it works .  If I remove the '//' comment-out tags, it doesn't, so obviously there's an issue with those statements.  I'm trying to populate an output 3-char field with either Yes, No, or N/A.  The Y/N comes from the contents of a field...

    Eric Witham690 pointsBadges:
  • Joining More Than 2 Files

    What is the best way to join more than 2 files using SQLRPGLE with embedded sql?

    TJSDAD35 pointsBadges:
  • Error in AS/400 code?

    Fstdt if e disk Dnam s 10a Ddept s 3a C/exec sql C+ SELECT NAME, BRANCH INTO :nam, :dept FROM stdt WHERE STDID < 10 C+ C/end-exec C seton lr Hai all ..! I have this code .. But i'm not getting the output.. how can i get the result?

    Sureyz2,720 pointsBadges:
  • Delete all records from file using SQLRPGLE

    How to delete all the records from file(bpro1) using sqlrpgle?

    Minuvinu35 pointsBadges:
  • Variable not found when calling a SQLRPGLE program

    Variable not found when calling a SQLRPGLE program with parameters in CL program CALL PGM(LIBXYZ/TESTRPG1) PARM(&LIBNAM &FILNAM) here LIBNAM AD FILNAM are passed with VALUES to the SQLRPGLE program and at sql statemet ie. insert INTO LIB/FILl( LIB is having the value and FILL is not getting...

    ravula725 pointsBadges:
  • Problem with updating status of PF1 in SQLRPGLE

    Please help. I am trying to execute the below code but the update doesn't seems to be happening. DDATS E DS EXTNAME(PF1) C/EXEC SQL C+ DECLARE TESTC CURSOR FOR SELECT * FROM PF1 ORDER BY NUMBER C+ FOR UPDATE OF STATUS C/END-EXEC *OPEN the CURSOR C/EXEC SQL C+ OPEN TESTC C/END-EXEC C/EXEC SQL C+...

    juslikdat1440 pointsBadges:
  • How to write multiple SQLRPGLE records into a printer file

    C/EXEC SQL C+ SELECT DISTINCT(CTP),COUNT(*) INTO :$Ctp,:#Ctotl FROM CUSTPF C+ GROUP BY CTP C/END-EXEC CTP is CustomerType in Customer File. Here actually I am getting 3 records as output. But I don't know how to write those 3 records into a printer file. Can anybody explain me how to write the...

    Sasikumarr200 pointsBadges:
  • Character in Cast argument not valid

    I need to retrieve the RRN and use it within my RPGLE program. I have the Select RRN(file) statement, but I get a Character in Cast argument not valid when executing. Any suggestions?

    trishahles10 pointsBadges:
  • How to write SQLRPGLE query with many select criteria

    I have a report to print using SQLRPGLE. The Report criteria screen has around 15-20 select conditions. Based on the conditions entered by the user, I build a query of type: Select * from emp1 where val1 = ? and val2 =? and val3 = ? and........... This is the first time I'm dealing with so many...

    Nutangujar895 pointsBadges:
  • Fetching multiple rows in SQLRPGLE

    Hi, When I try to fetch more records, I couldn't do it. Please see my code below and explain. Thanks.

    as400dev585 pointsBadges:
  • Cursor in SQLRPGLE

    Hi friends, Please explain the difference between the Scrollable, Non-scrollable and Dynamic scrollable cursors in SQLRPGLE with simple example. Thanks in advance.

    shyedajmal285 pointsBadges:
  • Why cursors are less efficient than RPGLE?

    I had created two programs for reading a PF and writing into another PF. 1) In RPGLE -- Runs very faster 2) IN SQLRPGLE using cursor -- Takes more time.. Why this CURSOR is slow? Both are AS/400 utilities right?

    dinuas400510 pointsBadges:
  • SQL logging

    How do we prevent our SQLRPGLE programs from creating so many job log records when executing?

    COOPERL10 pointsBadges:
  • SQLCOD 30 error

    I have a Fetch statement like this Exec Sql Fetch FileCursor into :FileDS. I am gettting SQLCOD as 30 and JOBLOG says Number of host variables less than result values. Declaration of FileDS is D FileDS E DS EXTNAME(FileNAme) Can anyone tell me the reason for this?

    RamvishakRamesh2,505 pointsBadges:
  • Dynamic operator on WHERE statement

    I have a file that has 2-fields that will be used to select records from file B. File A, field 1 = date_a & field 2 = Operator. I want to select records from File B and based on the value within the operator ( EQ, LT, LE, GT, GE) and the date_a. Ex: If in File A, the value of the field Operator...

    ibBusy4sure50 pointsBadges:
  • SQLRPGLE program executing at log off

    I wrote a simple SQLRPGLE program. It accepts a "from" and "to" code, deletes all records with the "to" code, then copies all "from" records, replacing the "from" code with the "to" code. It runs fine, produces expected results. When I log off the session which ran the program, even hours later, it...

    LynnPorgy20 pointsBadges:
  • RPG – Roll your own level breaks

    Has anyone every heard of 'Roll your own Level Breaks' in RPG? Can you enlighten me on how it works? I have to mimic a program that does this already with a different set of data. Here is a basic overview of the application. A selection screen allows you to select a date range, region, territory,...

    NickHutcheson11,390 pointsBadges:

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.

Following