• 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:
  • 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?...

    munduuu420 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,380 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,380 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...

    aceofdelts1,720 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...

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

    Dcantwell465 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,380 pointsBadges:
  • SQL RPGLE – How to override data set data structure at run time

    I currently have an SQL RPGLE 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:
  • 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:
  • 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:
  • Activation Groups, RPGLE, and Open Files

    Hello Everyone, We have a couple question regarding activation groups, RPGLE, and Open files. In our H specs for RPGLE and SQLRPGLE programs, some of our programs use dftactgrp(*yes), some use dftactgrp(*no), and some use dftactgrp(*no) actgrp(*caller). What are the differences? And, should all of...

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

    aceofdelts1,720 pointsBadges:
  • AS/400 and Oracle Access Manager

    I have a strange behavior in an SQLRPGLE program accessing iSeries DB2 and Oracle via Oracle Access Manager. The program is very simple and reads values from two Oracle Tables in this way : a. SELECT .... into ..... FROM Table1 WHERE ..... return OK : 1 row as expected with my two fields filled. b....

    Technet30 pointsBadges:
  • SQLRPGLE Prepare

    When using the prepare statement I'm creating a string that contains my select statement... I want to compare a numeric field within my string. For example I have batch# which is numeric, how can I say where batch# = 21

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

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

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

Following