• Record Locking in SQLRPGLE

    Hi All I have a SQLILE pgm which updates files through SQL statements. How to get the user id/job number which is locking the PF record through the program... if any data structure supports, whats the position of it... -Varun

    Varun123190 pointsBadges:
  • Commitment control in SQLRPGLE

    Hi All As we know that using COMMIT keyword at file level, to acheive commitment control, however I would like to know how to acheive commitment control using SQLRPGLE with out defining the COMMIT.

    Kar425 pointsBadges:
  • Embedded SQL using SUM or some other method to total up qty and display 1 unique record

    I have an sqlrpgle pgm setup, I want to add another sql select statement. I have a file that contains barcode label data, where multiple records can be assigned to the same Master serial #. My sqlrpg pgm is display various sorts in a screen inquiry. I want to setup my select, to display one record...

    Dobie80 pointsBadges:
  • Single commitment control in RPGLE program

    I have a rpgle program that uses 3-4 sql statements to update and insert data in 3-4 tables . Now what i want is that when program runs successfully then only these changes in tables should reflect else roll back . So for this is there any way to provide a single commitment control for all queries?...

    munduuu435 pointsBadges:
  • Embedded SQL in RPGLE hdr, dtl fetch for subfile build

    I am trying to join a header and a detail file and select all fields into data structures defined as external(filename). D dswtchdr      E DS                  EXTNAME(wtchdr) D dswtcdet      E DS                  EXTNAME(wtcdet) C     $CreateCsr   ...

    NickHutcheson11,390 pointsBadges:
  • Embedded SQLRPGLE Books, guides, how to’s

    Does anyone know of some good SQL books for RPGLE other than the IBM manuals? I need to learn more to keep afloat!

    NickHutcheson11,390 pointsBadges:
  • Embedded SQL in rpg for subfile build SQLCOD

    My fetch next in sql is getting sqlcod = -000000181 and sqlstt = '22007'.  I looked this up.  It says invalid date or time. Pointing to date data types in the file I am trying to read. The records contain two date fields and two time fields. How can I get around this?   Thanks in advance. Nick

    NickHutcheson11,390 pointsBadges:
  • How to handle record lock using embedded SQL?

    I am using SQLRPGLE program,need to handle record lock in sql statement ..plz suggest?

    Samule400160 pointsBadges:
  • CPF5032 and SQL RPG

    How do I unlock the data file to avoid halt ? CL used to sort file and call an RPG that cleared a field (followed by further processing). When I switch to an SQLRPG to clear the field, I get CPF5032 in the next program. Yes, I tried the UNLOCK op code in the SQLRPG but same result. No halt using...

    aceofdelts2,340 pointsBadges:
  • SQLRPGLE Error in UPDATE Query

    Hello, I have a SQL Statement in SQLRPGLE which Updates a 3 fiels in a file with 30 fields. SQL Statement is as below. UPDATE TABLE1 SET TXDATE = :SYSDATE, TXTIME = :SYSTIME, SETFLAG = :w_Set, MSG = :w_ERR, Comment = ' ' WHERE ID = :W_ID This works fine on one iSeries server and throws...

    sim400375 pointsBadges:
  • Problem Running SQLRPGLE program in Batch: Works Fine Interactively

    Hello all, We currently have a program that runs in batch. Last night, we had the following error occur: RNQ0103: The target for a numeric operation is too small to hold the result. The program works perfectly when run interactively. When the program was originially written, I compensated for the...

    Dcantwell480 pointsBadges:
  • Embedded SQL number of days between dates

    C/EXEC SQL                                C+ INSERT INTO SERIOVR60                  C+ SELECT HTSERN, HTPART, HTQTY, HTSTKL,  C+ HTSTS,  HTADAT,                        C+ substr(HTPART, 1, 11) AS HTMODEL,      C+ HTADAT -...

    NickHutcheson11,390 pointsBadges:
  • Help needed for connect statement using sqlrpg

    Hi All, I need to do some checking in 2 different AS400 servers. I will read the data from one server(say local) then using connect type 2, connect to the other server(say remote), check the data and then returns back to my local server. I'm using sqlrpg for this and created 2 pgms for this. One...

    160780 pointsBadges:
  • Can you embed SQL statements in RPG program

    I am new to AS/400 and we have a project wherein we have to display the records grouped by some fields. Is it possible to write sql statements within RPG program?? How???

    Shwesmile20 pointsBadges:
  • What does this mean when SQLCOD = -206? I need to write 2 sets embedded SQL statement in my program.

    what does this mean when SQLCOD = -206. I need to write 2 sets embedded SQL statement in my program. first one is one and I was able to fetch data but the 2nd one has error just right after I declare cursor. Here are the statements EVAL SQLSTMT2 = SELECT_H_2 + WHERE_H_2; + AND_H_A; EXEC SQL PREPARE...

    Huana5 pointsBadges:
  • Printing a PDF image from BLOB using SQLRPLGE

    How to print a PDF image stored in BLOB from SQLRPGLE?

    AS400rpgle15 pointsBadges:
  • SQL and RPG 400 (SQLRPG) Variable lengths help required.

    Please could someone help me with the following, I am new to SQL and have been tasked with the following:- I am writing an RPG program where the user will be able to do a search by entering up to 15 characters to find part numbers. I know how to do this using SQL but I am struggling with this when...

    AS400Kate15 pointsBadges:
  • Trimming just one leading zero (if present) in SQLRPGLE

    I have a SQLRPGLE program and have 6A character field. How to I trim just one leading zero(if present) Eg- if 001300 then I should insert 01300. Thanks!

    Anjita5 pointsBadges:
  • SELECTION OF UNIQUE RECORDS FROM FILE USING SQLRPGILE CODE

    I HAVE TO DO THE BELOW STEPS USING SQLRPG,PLZ HELP TO HANDLE THE UNIQUE RECORDS : 1. Delete records from Production LFPRIPMH/D file and those policy numbers are available in LFPS402S (unique policy number) 2. Insert into Production LFPRIPMH/D files from Before migration image (LFPRIPMH/D), where...

    AS400RAHUL5 pointsBadges:
  • Very simple SQLRPGLE not working

    I must be missing something simple. Any ideas ? Here's the code. C/exec sql C+ Update MFLLIB/ITMAST C+ Set IM_ITEMID = 'ST150EML' C+ Where IM_ITEMID = 'ST150E ' C/end-exec C Eval *inlr = *on   I simplified the update for test purposes.  No halts but no update.  Of course I can do the update via...

    aceofdelts2,340 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