CL Program Questions


passing variable in CL Program using QMQRY and SQL
Hi, I’m setting up a process where I can add or delete a record in a physical file. I’m using a simple CL program that runs a couple QM Queries. QMQRY - REVEALADD INSERT INTO mylib/myfile (myfile) VALUES(user) QMQRY – REVEALDLT DELETE FROM mylib/myfile WHERE myfile = ‘&USER’ CL code IF         COND(&OPTION *EQ ‘DLT’) THEN(GOTO CMDLBL(DLT)) [...]

Answer Question   |  September 14, 2010  2:15 PM
CL Program, Physical Files, QMQRY, SQL
asked by:
160 pts.

CL Programming
Hi Gurus, in cl how to write download file code.and use it in rpg? Is there any command for download file? Thanks & Regards, Sudheer

Answer Question   |  September 18, 2010  9:21 AM
CL Commands, CL Program, CL programming, RPG Programming
asked by:
50 pts.

Recieving a diagnostic message in program
hi i want to recieve message text of diagostic message that encounters in program .I want it in a variable so that i can write it into a error log file .Please suggest a way to trap them and to have the text. i tried using RCVMSG but it dint wor out.   thanks

Answer Question   |  September 3, 2010  6:32 PM
AS/400, CL, CL Program, Network diagnostics and measurements
asked by:
420 pts.

How to delete data from IFS directory?
How to write the program for deletion of data from IFS directory? Any cl program?  

Answer Question   |  September 3, 2010  7:49 AM
as/400 data, CL Program, IFS, IFS Commands, IFS Directory
asked by:
185 pts.

OPNQRYF HOW?
HI Everyone,  i need a idea, i have on CL program (pgm parm) a field wndate(8,0) and i need make a opnqryf (file1) compare wndate with mvdatl(8,0), but i only wanted the first 6 position (yyyymm) of both . Anyone give a idea how can i made this? OS/400 in V5R4M1 thanks in advanced.  

Answer Question   |  March 3, 2011  10:47 AM
CL Program, CLP, OPNQRYF, OS/400, V5R4
asked by:
225 pts.

I want to send a DB2 file via email from AS400 to MS outlook using MMAIL/SENDMIME command.
I want to send a DB2 file via email from AS400 to MS outlook.  I use command MMAIL/SENDMIMe inside my CL program. I’ve 2 issues. 1. whenever an email reaches to recipient, it attaches some .dat file which doesn’t have anything in it. 2. the attachment is in notepad, it removes the readability of columns. [...]

Answer Question   |  June 24, 2010  1:29 PM
AS/400 File Sharing, CL Program, Outlook
asked by:
70 pts.

How can I make the job generate just the higher severity messages?
Everytime a batch job ended abnormally, it generates thousands of pages of job logs.  The jobd is set to logclpgm *no,  msg logging 4/0/*nolist. The job log has all the details of the record read between api programs.  How can I make the job generate just the higher severity messages?  

Answer Question   |  June 23, 2010  8:39 PM
CL Program, iSeries, iSeries job, iSeries job logs
asked by:
5 pts.

Need to write a CL program to track user logins
HI, I WANT HOW TO WRITE A CL PROGRAMME TO KNOW A USER IS LOGGED IN OR NOT.MEANS IN A SERVER NUMBER OF USERS OR THERE SO I WANT TO FIND OUT WHICH USER IS LOGIN STATE WHICH OR NOT LOG-OFF STATE.WHEN I RUN A PGM TO PROVIDE USER NAME IT WILL SHOW THE LOGIN [...]

Answer Question   |  July 3, 2010  5:59 AM
CL Program, CL programming, User Login Data
asked by:
15 pts.

how can i use like in cl program?
how can i write this statment in cl program? Q -   select name from empname where name like %@name% thanks

Answer Question   |  June 9, 2010  11:47 AM
AS/400, CL Program
asked by:
5 pts.

Download from iSeries directly to an Excel xls file – no CSV
I need a little help! Is there anything out there that I can incorporate into a CL program that will download a database file to Excel with an xls extension so no further converting is necessary. I tried the CVTPFXLS but get Pointer not set for location referenced.

Answer Question   |  May 20, 2010  11:56 AM
CL Program, iSeries, iSeries programming commands, Microsoft Excel, XLS
asked by:
35 pts.

Connect to Oracle from AS/400
I need to connect to an Oracle database from an AS/400 (RPG III/CL program). Because I need to get some data. How can I do it? What do I need?

Answer Question   |  November 28, 2011  12:21 PM
CL Program, Oracle Database, RPG, RPG III
asked by:
5 pts.

cpysplf problem in cl program
i have a cl program with the cpysplf command that is executed within it. before executing, it retrieves all the spool file attributes from a declared file. when i debug the program all the attributes are correct but it doesn’t copy to the physical file. the file is at the top of my library list [...]

Answer Question   |  February 10, 2010  2:47 PM
CL Program, CPYSPLF
asked by:
SKF
75 pts.

Invoking A Menu Option From Within A Pgm
Our Operations dept type the command [Go Backup] and take option 1 Is it possible to automate these actions from within a CL pgm? Thanks Martin

Answer Question   |  February 5, 2010  11:22 AM
AS/400 programming, CL Program, CL programming
asked by:
30 pts.

Initiating a job only when a file contains records — CL
How can I code a CL program to submit a job only when a file contains records

Answer Question   |  February 1, 2010  6:47 PM
AS/400 jobs, CL Program, CL programs
asked by:
180 pts.

AS400 – FTP (put & get) files size compare.
Hi, i have created a ftp scritp to put & get (back trasferred file) then compare them using CL program. ie: FTP Script PUT FROM_LIBRARY/FROM_FILE TO_LIBRARY/TO_FILE GET FROM_LIBRARY/FROM_FILE QTEMP/TO_FILE CL pgm 1) RTVMBRD FILE(FROM_LIBRARY/FROM_FILE) NBRCURRCD(&NBRCURRCD) DTASPCSIZ(&DTASPCSIZ) 2) RTVMBRD FILE(QTEMP/TO_FILE) NBRCURRCD(&NBRCURRC2) DTASPCSIZ(&DTASPCSI2) 3) Compare results I FTP’ed to UNIX SERVER and in some cases #of records [...]

Answer Question   |  August 3, 2009  10:31 PM
AS/400 FTP, CL Program, FTP Script, Unix Servers
asked by:
45 pts.

Controlling JDE app outage times during CL reorg
We currently run a weekly reorg controlled by a CL program. Until recently we had a four hour window and are now looking to do the reorgs with the smallest possible JDE application outage. Any recommendations?

Answer Question   |  August 2, 2009  9:01 PM
AS/400 backup, CL Program, CL programming, JDE application outage
485 pts.

how to pass numeric data to cl program from as400 command line
Hi All, I want to pass numeric data of length (8 0) to my CL program while calling from AS400 command line but program is not receiving correct value into the program. Can anyone plz help me how to pass numeric data.

Answer Question   |  June 26, 2009  1:18 PM
AS/400 command keys, AS/400 Command Line, CL Program
asked by:
695 pts.

Run SEQUEL Viewpoint Client Report from CL
How can you run a Viewpoing client report from a batch CL job?

Answer Question   |  August 18, 2009  6:02 PM
Batch jobs, CL, CL Program, SEQUEL, Viewpoint
asked by:
5 pts.

Create a Stored Procedure using CL and RPGLE programs
I have an RPGLE program called from a CL program for database files overrides. I want to call the same programs from a stored prodecure on SQL Server from within a Web application. I am brand new to SQL Server but am pretty good on the AS400.

Answer Question   |  August 26, 2009  3:17 PM
CL, CL Program, RPGLE, RPGLE Program, Stored Procedures
asked by:
20 pts.

Transact SQL stored executed from AS/400 CL program.
How can I execute a Transact SQL stored procedure (actually in the database) on a SQL 2000 database from an AS/400 CL program.

Answer Question   |  June 10, 2009  2:39 PM
554 transaction failure, AS/400, CL Program, SQL Database, SQL Server 2000, T-SQL Stored Procedures
asked by:
20 pts.