CL Questions


not a valid Query Management variable.
Hi, can someone please help me, I am trying to use the QMQRY function to run an update statement. I pass it a variable from the program. Get the following error. is not a valid Query Management variable. Error found on STRQMQRY command. Function check. CPF0001 unmonitored by PGMFCTSEC at statement 3500, instruction X’0021′. Can [...]

Answer Question   |  October 8, 2009  11:32 AM
CL, CL programming, CL variables, QMQRY, Query Management Facility, STRQMQRY, V5R4, Variables
asked by:
Pmh
5 pts.

CL Program
How to create ‘n’ number of userprofile from CL Program.

Answer Question   |  September 28, 2009  12:25 PM
CL, CL programming, CL programs
asked by:
75 pts.

RPG Programming Standards
I’M LOOKING FOR RPG PROGRAMMING STANDARDS. We have always had standards example if you create a report the report should have the date, title, program name, page numbers.  Does anyone have a stanards document or is there anything on the web?   I appreciate your help!    

Answer Question   |  September 23, 2009  3:51 PM
AS/400, CL, Documentation, IBM, RPG, standards and methodology
asked by:
15 pts.

Can i declare a display file and a physical file in a single CL
Can i declare a display file and a physical file in a single CL.  Also can u share a sample program, which uses the parameters entered in the display file (using SNDRCV command) and processes records from a physical file.

Answer Question   |  September 10, 2009  12:11 PM
AS/400 Display File, CL, CL programming, Physical Files
asked by:
1,160 pts.

How to get IP address of as400 machine in CL pgm
Hi CAn any 1 tell me how to get the IP address of the AS400 machine in CL program.Are there any API for this.I need  to pass this IP to run a java program thrugh CL.. Thankx in advance Supriyob  

Answer Question   |  October 22, 2009  11:00 AM
API, AS/400 Management, CL, CL programs
asked by:
165 pts.

Displaying data through DSPF and CL programm.!
I would like to be able to display one record from my PF with DSP file through a CL program on my screen. I have these sources: CL program: ******************************************** QSYSPRT          1  QPADEV0021  USERNAME      pgm              DCLF       FILE(MyLib/SPOOLTMP) RCDFMT(S) +                                  OPNID(DSP)                                                                                                           DCLF       FILE(Mylib/SPOOLTEMP) RCDFMT(SPOOLTEMP) +                           OPNID(PF)                                                                                                            RCVF       DEV(*FILE) RCDFMT(SPOOLTEMP) [...]

Answer Question   |  October 11, 2009  2:07 PM
CL, CL programming, CL programs, DSPF, PF
asked by:
80 pts.

SNDUSRMSG equivalent in RPG (including VALUES and DFT)
Some time ago I found a piece of code by Scott Klemens regarding the implementation of SNDUSRMSG in RPG using QMHSNDM and QMHRCVPM. I need to do the exact same thing, however I also need to pass the values for the VALUES and DFT keywords used with SNDUSRMSG. Does anybody have an idea on how [...]

Answer Question   |  April 20, 2010  1:19 PM
API, AS/400, CL, iSeries, RPG, SNDUSRMSG
asked by:
5 pts.

IFS File Attributes
How do you retrieve the Creation Date of a link file object (an STMF) into a CL program?

Answer Question   |  August 3, 2009  11:35 AM
CL, IFS, STMF
asked by:
100 pts.

upload to as/400
hi, my user can only use client access to upload and download file only (please assume there is only this method), is it possible for me to write a batch file to automate the upload and download. just like ftp, i can always write a script to put all the ‘GET’ command and trigger the [...]

Answer Question   |  July 14, 2009  1:35 AM
AS/400 FTP, CL, Client Access
asked by:
55 pts.

SAVOBJ with OBJ as variable
Can we use variable in SAVOBJ like SAVOBJ OBJ(&OBJLIST).? I have a file containing list of objects to be saved. I was planning to read and concatenate the object names in &OBJLIST and later use in SAVOBJ. But getting a “Value ‘xxxxx xxxxx’ for OBJ not a name or generic name. I think the quotes [...]

Answer Question   |  July 13, 2009  11:46 AM
CL, OBJLIST, SAVOBJ
asked by:
60 pts.

Save selected files using RSTOBJ
I have written a pgm for our package installation which basically extract the objetcs from a save file shipped to customer along with the pgm. Now, before restoring the objects I need to take backup of the required object from the application lib. I have a PF file shipped with the save file which contains [...]

Answer Question   |  July 10, 2009  7:17 AM
CL, Restore Object, RSTOBJ
asked by:
60 pts.

email from rpg
I want to be able to email from a RPG/CL several .csv files from the IFS

Answer Question   |  July 14, 2009  1:49 AM
CL, Email IFS files, IFS, RPG
asked by:
55 pts.

SAVOBJ
I am trying to use the SAVOBJ command to copy files to a save file. Is there a way to add to the save file and not write over it with each SAVOBJ call? I know I can create a list of files and send all of them to one save file but I would [...]

Answer Question   |  October 23, 2009  7:33 PM
CL, CL Commands, CL programming, SAVOBJ
asked by:
5 pts.

Calling a procedure from a CL program
Hi, how do we call a procedure, with parameters from a CL program? Does anyone have examples?

Answer Question   |  July 7, 2009  5:01 AM
AS/400 Control Language, CL, CL Procedure
asked by:
55 pts.

how to convert spool files to pdf
I am trying to convert spool files to PDF fromat na d having special Arabic charracters any bod gelp ?

Answer Question   |  June 30, 2009  8:10 AM
Arabic numerals, AS/400 PDF, CL, Spool files
asked by:
Aq
15 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.

How can I use FNDSTRPDM with CL
HOW CAN I USING “FNDSTRPDM” BY CLP AND THE VARIABLE OF “FIND ‘string’ ” LAST CHARACTER IS A SPACE ?

Answer Question   |  June 12, 2009  10:30 AM
CL, CLP, FNDSTRPDM
asked by:
5 pts.

self-submitting cl pgm doesn’t release screen
The interactive code in the CL pgm calls an RPG subfile pgm. The user makes selection, the CL pgm steps to the SBMJOB command, the CL pgm is executing the Batch portion, but the screen is hung up with “X system” displayed until batch job is done. The RPG is turning “ON” *inlr and RETURN [...]

Answer Question   |  June 4, 2009  2:22 PM
CL, CL Program
asked by:
30 pts.

CL DCL Initial Value
I have a program that assigns an initial value to a variable (&TYPE) in the declare statement (value of ‘L’). Is there a difference in how that value is stored as an initial value versus the value loaded using the CHGVAR command? This variable is passed as a parameter to an RPG program and needed [...]

Answer Question   |  May 27, 2009  2:34 PM
CHGVAR, CL, DCL command
asked by:
5 pts.