Recent IT Questions

1 - 20 of 24
<<PREVIOUS 1|2 NEXT>>

Embedded SQL

In SQL RPGLE program, I declare a cursor using a view.. The view has name Emp_Pat_Dept_Data(EMPdata) the empdata is the AS400 name. In my cursor def which name I should use. Also for the fields referenced do I need to use the renamed field names in the view definition or I can use the field names...

View Answer   |  Sep 28 2009  9:29 PM GMT
Embedded SQL, SQLRPGLE
asked by Nutangujar

  745 pts.

AS400, SQL and COBOL anomalies

I coded an update query in COBOL and included COMMIT=NONE so the update could go through. When the COBOL program executed it returned nulls, and coalesced the value to the default. When the query was executed either through qmqry or on-line on the sql screen it worked fine and updated the field...

View Answer   |  Sep 23 2009  5:31 PM GMT
AS/400, COBOL, iSeries
asked by Matis

  25 pts.

Is it possible using Embedded SQL or something else in RPG to directly update and MS SQL DB

I have a need to push data from the AS/400 to an SQL DB on an SQL 2008 server. I was wondering if there was a way to do this natively within RPG on the AS/400 without purchasing something. Was thinking embedded SQL or stored procedures might be able to accomplish this. Has anyone done this? ...

View Answer   |  Sep 23 2009  3:35 PM GMT
AS/400, Microsoft SQL Server, Embedded SQL
asked by Minidach

  15 pts.

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

View Answer   |  Apr 10 2009  7:35 AM GMT
SQL/400, Embedded SQL, SQLRPGLE
asked by Alpfalpf

  25 pts.

How to find out which embedded SQL taking more time in RPGIV program

Hi All, I have 4 Embedded SQLs in my RPGILE program. Can any one tell me how to find out which SQL taking more time to execute ? are there any commands/methods to find out ?

View Answer   |  Mar 31 2009  12:42 AM GMT
RPGILE, Embedded SQL, RPG IV
asked by Mohan K

  465 pts.

Embedded SQL in an RPG FREE program

I am developing an on-line screen program, where the user can select a view of the data from a list of "views". This is my first crack at embedded SQL, Basically i issue the Prepare, declar the c1 scroll cursor, and then open c1, and then do the fetch. At this point I am loading the subfile. ...

View Answer   |  Mar 25 2009  5:17 PM GMT
Embedded SQL, RPGILE, SQL
asked by Merts

  25 pts.

what is the max length for an sql cursor name?

what is the max length for an embeded sql cursor name in RPG?

View Answer   |  Mar 20 2009  1:19 PM GMT
RPG, Cursor Length, SQL Cursors
asked by TheMarkWTaylor

  5 pts.

How to use embedded SQL in a RPG program used as a stored procedure

When I use embedded SQL in a RPG program and call it from another program it works fine. But, when I try to use the program as a stored procedure it gives me a SQL error. I have worked with stored procedures and understand them, but have not been successful using embedded SQL with them. Any ideas...

asked by Warykat

  20 pts.

redord retrieval in SQLRPG

Hi, can anybody tell me how to retrieve a record randomly using cursors...(say 8th record) using SQLRPG(Embedded sql)

View Answer   |  Jan 27 2009  8:11 PM GMT
SQLRPG, Embedded SQL
asked by Ten2008

  675 pts.

delete from flat file

HI My flat file contains data copied from a spool file.The records in this file is used as reference to delete links from dir.Can i delete those records in the flat file for which there is no link in the dir(that is the link or text file object has been deleted from the dir) ?I tried using...

View Answer   |  Jan 22 2009  1:39 PM GMT
RPG, RPG Flat Files, Spool files
asked by Anderson123

  840 pts.

Unable to use delete statement in SQLRPG

Hi I want to use this query delete from abc a where rrn(a) between 1 and 10 in an sqlrpg prog.I was getting error messages saying rrn keyword not allowed.Am not sure how to execute this in an embeddd sql program.

View Answer   |  Jan 19 2009  11:43 AM GMT
RPG, SQLRPG, SQL
asked by Anderson123

  840 pts.

Can embedded SQL in a SQLRPGLE program be used as a stored procedure?

I am successfully using (external) stored procedures with many RPGLE programs. (Some of these are SQLRPGLE programs because they return a result set.) All of this works fine. But if I try to replace some of the RPG I/O in a RPGLE program with embedded SQL, creating a SQLRPGLE program, and run it...

View Answer   |  Jan 14 2009  10:09 PM GMT
iSeries RPG programming, Stored Procedures, Embedded SQL
asked by Warykat

  20 pts.

Embedded SQL over multiple physical file members

Hi, I'm writing a program to process all the members in a physical file. I've done this using embedded SQL because the selection criteria is quite complex. The physical file belongs to an application which I can't change, so I will always have to deal with multiple members. I also don't have...

View Answer   |  Jan 5 2009  12:56 AM GMT
Embedded SQL, RPG, Physical File
asked by Gilly400

  23625 pts.

Embedded SQL to process ALL members

Hi, I'm trying to get an RPG with embedded SQL to read all the members in a file. I know I used to be able to do this with an OVRDBF command with *ALL specified for the member, but this doesn't seem to work anymore. In the joblog I get a CPF4268 message which says the file has no members or is...

View Answer   |  Dec 22 2008  12:54 AM GMT
AS/400, iSeries, SQL
asked by Gilly400

  23625 pts.

Conditional processing in embedded SQL

I'd like to conditionally control the host variable into which the data from an SQL select statement is retrieved. This is for flexibility, so that I can use the same code in my program more than once. Here is a code sample: C/EXEC SQL C+ If :ResultName = 'AgtMaster' C+ Then ...

Answer Question   |  Dec 4 2008  6:25 PM GMT
SQL, SELECT statement, Conditional expressions
asked by Cwc

  3825 pts.

iSeries RPG Embedded SQL Performance

Hi, I'm trying to replace some long running Query/400 jobs with RPG and embedded SQL. Some of the existing jobs run for almost 24 hours on our machine. I've already successfully managed to reduce a few of these jobs to a matter of minutes using embedded SQL. So far, so good. My problem is when...

View Answer   |  Nov 12 2008  2:17 PM GMT
iSeries, SQL, RPG
asked by Gilly400

  23625 pts.

Page up and page down coding for embedded SQL

I want to code loading a single page subfile through Embedded SQL. How do I handle the page up and page down key in that program?

Answer Question   |  Nov 11 2008  5:31 PM GMT
AS/400, Embedded SQL
asked by AS400 - Ask the Expert

  395 pts.

Grouping the records in RPG

How to I group the records in the database based on one particular field?? When i try using a group by clause in the embedded SQL, it give me a 'SQL precompile failed' error. How do I handle this?? And i have to display the employee records grouped by their locations... how can this be done??

View Answer   |  Oct 21 2008  4:39 AM GMT
RPG, Report Program Generator, RPG/400
asked by Shwesmile

  20 pts.

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???

View Answer   |  Oct 14 2008  4:48 AM GMT
SQL, RPG, Embedded SQL
asked by Shwesmile

  20 pts.

Embedded SQL

I need to get a grip on using the embedded SQL in an RPG ILE program using the word "CURRENT" and I need to know how this works (in laymens terms please.)

View Answer   |  Oct 11 2008  6:51 PM GMT
SQL, RPG, RPG ILE
asked by Chinadoll041498

  10 pts.

1 - 20 of 24
<<PREVIOUS 1|2 NEXT>>