• CURSOR issue in AS/400

    Hi Friends please someone help me on the below issue. I have a SQL query which I ran in STRSQL. Initially it's showing 17 records in first page and pressed Page down to go to 2nd page then it's showing second set of 17 records. And then If I press page up to go to 1st page again I could see that...

    SatishKumar00730 pointsBadges:
  • How to compare numeric date field with other date fields in SQL?

    Delete from LIBXXX/testB where orddtb<=080917 . The above code compare the date as numeric comparison. But I want date comparison. orddtb is declared as (6P 0). Please help me to compare numeric field date with real date. So that I can process the records. That Date field should be dynamic which...

    rajeshkmr571220 pointsBadges:
  • RPQSQL / SQLRPG

    Any body please help Wanted to know the advantage and disadvantage using RPGSQL / SQLRPG I've heard that this is the new one its not only RPG but become one with SQL. Thanks in advance

    TG50 pointsBadges:
  • Synon – Compilation

    Hello Everybody, I would like to know whether it is possible to use “SQLRPGLE“ source types in Synon, I am currently using Synon “8.1SP1” version.  Can anyone explain the procedure to compile “SQLRPGLE” source type in Synon? Thanks & Regards Bibin George

    BibinGeorge130 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.

    as400dev620 pointsBadges:
  • SQLRPGLE: Not able to load data into subfile

    Loaded the data into subfile with SQLRPGLE - prepare statement and cursor and now if I go back and again tried to load back, not able to load the data to the subfile.

    ravula755 pointsBadges:
  • SQLRPGLE – problem with the like while using the wild card

    Hi all, I need your help in the Wild card search in SQLRPGLE. I'm entering the %XAS% in the display file screen field  and now based on the scan if I come across the field is with Wild card, I will use the like :Searchname in the SQLRPGLE code.

    ravula755 pointsBadges:
  • SQLRPGLE Cursors and Recursion

    I'm trying to recursively call a PI in my SQLRPGLE program. Problem is, I get an SQLCODE error of -519 and I'm sure it has to do with cursors and the prepare statement in my PI. Here's the code: pprintPrograms    b      dprintPrograms    PI      d...

    Dcantwell480 pointsBadges:
  • 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 '%'...

    Prashanth123270 pointsBadges:
  • SQLRPGLE with dynamic query

    I have employee1 table with field student_id,name,marks and table with field name, suppose NEHA is present in name field, I have a table with name NEHA. In name table marks,id and subject field is there. I want to fetch subject from name table(neha) where marks >10. I need to write SQLRPGLE...

    nabamita90 pointsBadges:
  • SQL host variable with data structure array

    I am trying to write Printer file format using Data structure. Below is the code: Dcl-Ds abc extname('prtf':'data':*output) qualified template; End-Ds; dcl-ds test likeds(abc) dim(100); I am fetching records using fetch first for n rows statement into test DS array and every time it is giving me...

    Abhi583910 pointsBadges:
  • Require Solution SQL0104 error

    I am trying to compile the below SQLRPGLE code but getting an error SQL0104 because of IN function used with comma. However, the same code is running fine in different server. Source Code: H DftActGrp(*No) ActGrp(*Caller) /Free Exec SQL Set Option Commit=*None; Exec SQL INSERT INTO QTEMP/WKMT5TMP...

    Mdshadabalam130 pointsBadges:
  • Dynamic query statement for SQLRPGLE

    Hi, I would like to build a dynamic query, (File, field and no of fields). User may send one or multiple fields of different data type has to be joined together into to build a query statement. Currently, I prepare a statement , works good for one field. PREPARE Qry_Stmt FROM :Stmt1; When I try for...

    as400dev620 pointsBadges:
  • OPNQRY and WRKQRY

    In WRKQRY, there is an option to save the selected records to an output file. Similarly is there a way to use OPNQRY in a CL or in an SQLRPG to directly move the selected records to another file?

    AnonymousUser49,520 pointsBadges:
  • SQLRPGLE – How to override data set data structure at run time

    I currently have an SQLRPGLE routine that receives a SELECT statement as a parameter and then fetches the data set into a data structure based on the file. This only works over a single file as the datastructure is created at compile time and has to be based on filea. I would like to make this...

    NarkedDiver20 pointsBadges:
  • Stop AS/400 job purge program

    I have a requirement where i have to submit a PGM in batch. This program is a SQLRPGLE program that deletes record from a file. I have scheduled it at 8pm and I want to stop its purging at 10pm. This means this job will run for 2 hours every day after which it should be stopped. How can I achieve...

    Supriyoas400250 pointsBadges:
  • SQL in an SQLRPGLE program

    I want to use embedded SQL in an SQLRPGLE program to search a file for a field entered in a screen to select data using the LIKE operand. This is my code C/EXEC SQL C+ DECLARE C1 CURSOR FOR SELECT * FROM F0101JN WHERE ALADDZ = :SZIP C+ AND ABALPH LIKE :SINNME ORDER BY ABAN8 C/END-EXEC * I entered...

    Alpfalpf25 pointsBadges:
  • SQLRPGLE – Result Set

    I have an SQLRPGLE program [PGMA] containing the following: D ResultSet       DS                                 D                                     Qualified     ...

    Riccam30 pointsBadges:
  • What is the difference between using RPGLE and SQLRPGLE when updating a file?

    What is the difference in updating a file using RPGLE or SQLRPGLE?

    mcasantoshrai55 pointsBadges:
  • Inserting records from 1 to 99 in a file

    Hi, How to insert records in a file of 2 field lets say field1 and field2 field1 is constant like 'Name' and field 2 needs to be increased by 1 up to 99. How to write SQLRPGLE program for this?

    6r1,885 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