CLP Questions


Ending a job through CLP
I am trying to end a job using ENDJOB command from a CL program submitted to batch, but this does not end the intended program and emits an error some kind meaning “Not allowed”. I made user that the profile has enough preveliges. Any idea how to end a job through batch?

Answer Question   |  December 16, 2009  8:23 AM
AS/400, AS/400 jobs, CLP
asked by:
280 pts.

Meaning of USER MOD FLAG generated in RTVCLSRC
The source generated from the RTVCLSRC command has some header comments which give some information about the CL program.  One comments has; “User mod flag  . . . . . . . . . . . . . :   *YES” .  I can’t determine what this means or refers to.  Any ideas?              

Answer Question   |  November 30, 2009  1:04 PM
AS/400, CLP, RTVCLSRC
asked by:
20 pts.

Retriveing massage from submited job in CLP
I have CLP and a cobol program. CL program calls the cobol program in Batch mode by doing SBMJOB. The cobol program processing 1000 records from a database file. If it founds errorneous record in the time of processing, then it stops processing with a system generated error massage and control go backs to CL [...]

Answer Question   |  November 30, 2009  9:22 PM
CL/400, CLP, CLPROGRAM
asked by:
15 pts.

AS/400 Program To List Physcial Files with Deleted Records
We currently have a program to list Physical Files with Deleted Records. The CLP utilizes the DSPFD command to build an out-file. The parameter for ‘Type of Information’ is *MBRLIST and ‘File Attributes’ is *PF. However, the out-file lists the data at the member level. Also, teh job takes TOO LONG to execute. Rather then build [...]

Answer Question   |  November 6, 2009  9:32 PM
AS/400, CLP, deleted records, List
asked by:
40 pts.

Database Creation using CLP
Hello Everybody, I have a small question. First I will explain my requirement. Requirement: I have a database file let’s say “PF1”; I am fetching some records from this file based on some criteria. This fetched record I have to write to one database file “PF2” (This contain six fields). This database file (PF2) doesnt exist [...]

Answer Question   |  October 8, 2009  5:18 PM
CLP
asked by:
130 pts.

FTP through CLP program
Hello, I have a script written for ‘INPUT’ file during the FTP process. The user-id and the password are being hardcoded in the script.To maintain the security I want to encrypt the password alone in the script.May be when the FTP is in action, the password can be retrieved from a file or data area [...]

Answer Question   |  October 8, 2009  5:45 PM
AS/400 FTP, CLP, FTP
asked by:
55 pts.

Best way to retrieve values, SQL or Queries and how?
Hello everybody, my problem is, in a iseries i have ia file and in this file exist one field with 10000 lenght (character) and i want retrieve a value like (  60F: ) but i don´t know in what position, after i find this value i need the follow values. ex: this is a part [...]

Answer Question   |  November 3, 2009  10:33 AM
CLP, Query/400, RPG IV, SQL, V5R4, V5R4M0
asked by:
225 pts.

How Can I pass multiple USER ID’s to QEZSNDMG
Does anyone have an example of passing multple user id’s to the API QEZSNDMG?  I have a CL that calls QEZSNDMG and it works fine with one user or *ALLACT.  I need to supply a list of multiple users that I can pass to it.  Anyone have an example of that?

Answer Question   |  October 9, 2009  3:59 PM
AS/400 API, CLP, iSeries, QEZSNDMG
asked by:
50 pts.

Truncating parameters!
I haev a 6 position alpha variable that has a value of ’12345 ‘ (a trailing blank). When I submit a job that does a CALL to a pgm with that variable as a parm, the submitted job has the value of that parm as ’12345′ with no trailing blank. Both pgms declare the variable [...]

Answer Question   |  September 10, 2009  8:10 PM
CLP, parameter values, Variables
asked by:
20 pts.

AS/400: Close open files problem
Dear sirs, could you please help me with the following problem: I want to close all open files that are left open from previous different steps (pgms rpg , rpgle , clp) that were run. I have tried to use a CLP pgm using RCLRSC, RCLRSC *CALLER with no success. Could you please advise me [...]

Answer Question   |  June 12, 2013  9:24 PM
AS/400 development, CLP, RCLRSC
asked by:
75 pts.

STRQMQRY
If you use a CLP to pass parameters to a STRQMQRY command. How do you disable prompting this command.

Answer Question   |  November 9, 2010  5:19 PM
CLP, STRQMQRY
asked by:
85 pts.

file transfer via client access
Hi, in order to upload files from pc, i will usually write a FTP script in rpgle and trigger the FTP command in CLP to ‘get’ the file. due to security reason, FTP now is not allowed to use. May i know is there any way to upload pc file via client access with SCRIPT [...]

Answer Question   |  July 17, 2009  4:43 PM
CLP, FTP, RPGLE
asked by:
55 pts.

converting s36 procedures into as400 mile clp programs
is there a conversion command to convert s36 procedure into clp programs?

Answer Question   |  July 1, 2009  4:50 PM
AS/400 programming, CLP, CLPROGRAM
asked by:
15 pts.

Using SQL Connect Statement in SQLRPGLE
I need to use the SQL CONNECT statement within a SQLRPGLE program to connect from one AS400 system to another. I need to get data from one file to another. Does anyone know how to do this? Can it be done within a program. I have no trouble when I do it on an SQL [...]

Answer Question   |  June 30, 2009  9:00 PM
CLP, RPGLE, SQL, SQL Connect Statement, SQL statements
asked by:
5 pts.

Clearing a window in CLP
I am calling a window program from a CLP program. When I try to redisplay the origina screen the window data stays on the screen. How can I clear this old screen data?

Answer Question   |  June 23, 2009  2:41 PM
CLP, CLPROGRAM
asked by:
10 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.

MONMSG
where could i get all the MONMSG list of messages to code in a CLP?

Answer Question   |  May 27, 2009  6:21 PM
CLP, MONMSG
asked by:
1,150 pts.

Retreive Stream file size through CL
Hi, How to detemine the file size of a ‘.TXT’ file through CL program? Its a file stored in the IFS folder. Is there any specific command to do this? I need to continuosly look into this folder for the file. Fetch the file size. Wait for some sec and then again retrive the file [...]

Answer Question   |  February 25, 2009  11:23 AM
AS/400 Control Language, CL, CLP, Stream files
asked by:
70 pts.

joblog as400 printing
I’m running a job that could write many joblogs. What I want: if there are any kind of errors (even those answered with an Ignore) the joblog will print, else there is no joblog printed. I can get prints on a hard cancel of a clp but not if answered with an ignore.

Answer Question   |  February 5, 2009  2:22 PM
AS/400 jobs, AS/400 printing, CLP
asked by:
170 pts.

I have an OVRDBF command that quit working.
I added 3 fields to each of the files referenced in the OVRDBF command and then recompiled all 5 CLP’s that have the same OVRDBF command in them. Here is a copy of the CLP…. CHGVAR VAR(&TITLE) VALUE(‘SETLMAST’ *CAT &YEARC) CPYF FROMFILE(*LIBL/&TITLE) TOFILE(SM1099) + MBROPT(*REPLACE) FMTOPT(*MAP *DROP) OVRDBF FILE(SETLMAST) TOFILE(*LIBL/SM1099) here is the error messages [...]

Answer Question   |  January 15, 2009  4:38 PM
CLP, OVRDBF
asked by:
5 pts.