CLP Questions


CLP Programming
PGM DCLF FILE(AMITLIB/STUDPF) LOOP: RCVF RCDFMT(STUDRRC) MONMSG MSGID(CPF0864) EXEC(GOTO CMDLBL(END)) SNDUSRMSG MSG(&NAME) OPNQRYF FILE((AMITLIB/STUDPF)) QRYSLT(*ALL) GOTO CMDLBL(LOOP) END: ENDPGM it displays only the first data in the file. how to display all the records present in the file?

Answer Question   |  March 18, 2013  9:47 AM
CL programming, CLP
asked by:
380 pts.

Can an initial program send a pgm message?
Is it possible for an initial program (CLP), that runs when a user logs in, to send a message to the queue of the initial menu? *PRV, *EXT and *SAME do not work when specified as the PGMQ.

Answer Question   |  November 19, 2012  8:57 PM
AS/400 - CL Command, CLP, initial program, SNDPGMMSG, user profile
asked by:
65 pts.

CPF4131 in a CLP
I know all too well about Level Check in an RPG. Today we had a CLP (doing SNDRCV of a screen file)get this error. Is this something new or merely so rare to get this in a CLP? I recompiled and all seems well, so certainly no urgent problem. V6R1.

Answer Question   |  May 22, 2012  4:25 PM
AS400/RPG, CLP, SNDRCV
asked by:
1,565 pts.

populate the values of pagerange on chgsplfa
i want to be able to programmatically change the values of the pagerange parameter in the chgsplfa command. there are two elements and i want to be able to access them.

Answer Question   |  March 17, 2012  2:05 PM
CHGSPLFA, CL command, CLP
asked by:
75 pts.

iSeries Call to QSYGETPH returns with CPF22E9 – worked ok in OS V5 but now doesnt in OS V6!
A Clp which calls QSYGETPH with parms ‘User’ ‘*NOPWD’ ‘Profile Handle’ ‘APIERR’ returns with CPF22E9 – User requires *USE Authority. This worked ok before we went to OS V6 at the weekend. I have checked the User Profiles have *USE Authority to each Profile and the programs QSYGETPH,  QWTSETP and QSYGETPH have *Public *use. What else [...]

Answer Question   |  March 19, 2012  2:25 PM
CLP, CPF22E9, iSeries
asked by:
5 pts.

OPNQRY File
OPNQRYF Query Hi, I am having difficulty in figuring out the syntax for using the special keyword %values with the variables in the OPNQRYF command. Below is the &QRYSLT I used.  CHGVAR VAR(&QRYSLT) VALUE(‘(DQB8ST *EQ “A” *AND + DQJRCE *EQ %VALUES( ‘ *TCAT &MARKET + *CAT ‘ )) *OR (DQB8ST = “D” *AND DQZRCD = [...]

Answer Question   |  March 17, 2012  12:33 PM
AS/400, CLP, OPNQRYF, RPG, value
asked by:
125 pts.

MCH4429 error message
I’m attempting to restrict DFU to inquiry only for specific users. I renamed STRDFU in QSYS to something else, then wrote my own STRDFU command & CLP. The CLP restricts various users as necessary. All ‘qualified’ users still get full blown DFU, the others get inquiry only. The problem is that I get an MCH4429 [...]

Answer Question   |  March 31, 2012  3:26 PM
CLP, CLPROGRAM, MCH4429 error, QSYS, STRDFU
asked by:
10 pts.

Receiving a Message from Message Queue
I would like to receive the latest message from as400 message queue. Any one can suggest the best possible way.

Answer Question   |  March 31, 2012  6:05 AM
AS/400 Message Monitoring, AS/400 message queues, CL programs, CLP
asked by:
195 pts.

CL program to transfer a job to QINTER
hi guys, this is a long one. i use to telnet a client in a virtual dsiplay, using the command telnet rmtsys(clientsys) rmtvrtdsp(operacao). The problem is that if someone is using this display, and you try to access it, you will be kicked out without knowing why. So, i need some help to write a [...]

Answer Question   |  March 31, 2012  4:47 PM
CL programs, CLP, iSeries, QINTER, Telnet, V5R4
asked by:
285 pts.

Select files by wildcard
An old application running S/36e creates workfiles in library QS36F with the following name-structure: ABC.aaXb where ‘aa’ and ‘b’ are random characters, and the ‘X’ is constant. These workfiles are sometimes not  deleted by the application even if they should have been. Once in a while a data-entry program cannot execute since it tries to [...]

Answer Question   |  March 31, 2012  8:07 AM
AS/400, CLP, Qshell, Wildcard
asked by:
2,540 pts.

RPGLE Getting around recursive calls
With proceedures I read that recursive calls are allowed.  No time to get into proceedures. clp calls, pgm1. pgm1 add function displays scrn2, then calls pgm2, pgm2 calls pgm3, pgm3 calls pgm4. pgm1 update function calls pgm4. Issue is that pgm4 can call pgm1, pgm2, pgm3, pgm5, pgm6.  On the call to pgm1 a recursive [...]

Answer Question   |  June 24, 2011  6:12 PM
AS/400 Procedure Pointer, AS400 RPGLE, CLP, RPGLE
asked by:
1,380 pts.

AS/400 tab text delimited format of physical file
Hi , Using i series utility you can download PF as Text Tab Delimited format in your PC.However when I do the same by CLP using CPYTOIMPF using FLDDLM as X’05′ or *tab , I get a text tab delimited file which is not completely same as the file downloaded using I series utility.

Answer Question   |  June 17, 2011  6:06 AM
AS/400, AS/400 Database File, CLP, CPYTOIMPF, Database Files, DBF file
asked by:
115 pts.

Can CL Programming language can have level check error
 hi friends in CL Program is it possible that we can get Leve Check Parameter…

Answer Question   |  May 10, 2011  5:19 PM
AS/400 Parameters, CL Procedure, CL programming, CLLE, CLP, Level Check
asked by:
60 pts.

Answer a monmsg from within CL?
I have a clp that calls on a prog that sometimes issues a error message. manually i would respond with an I to ignore and all is well. Now my question, can I use monmsg msgid(mycpfmsg)to auto reply to this message. I have it monitoring inside the cl for this message since i thought that [...]

Answer Question   |  May 2, 2011  8:01 AM
AS/400, CL Program, CLP, MONMSG
asked by:
205 pts.

CLP parameters overwritten
Hi.  When I call a CLP, either from command line or from a sbmjob with alpha parameters, if I don’t fill up the whole string length it’s trailing blanks are overwritten by the next parameters.  Example:  PGM PARM(&P1 &P2 &P3)  DCL VAR(&P1) TYPE(*CHAR) LEN(50)  DCL VAR(&P2) TYPE(*CHAR) LEN(50)  DCL VAR(&P3) TYPE(*CHAR) LEN(50)  ….  CALL XX [...]

Answer Question   |  April 4, 2011  12:20 PM
CL programs, CLP, OS/400, Parameters, SBMJOB
asked by:
15 pts.

What is ovrdbf?
Hi all , Actually I know OVRDBF is used to override database file . After OVRDBF we have to use OPENQRY command But My question is , What purrpose this OVRDBF file created and After creation it will accessible to all the programs at a single time , Means can we access OVRDBF file in [...]

Answer Question   |  March 3, 2011  12:28 PM
AS400/OPNQRYF, CLP, OPNQRY, OVRDBF
asked by:
185 pts.

SNDTCPSPLF Problem
Hello all, I ran into an issue with SNDTCPSPLF.  Here’s what the command looks like: SNDTCPSPLF RMTSYS(LOCALHOST) PRTQ('QUSRSYS/THISOUTQ') +                FILE(&SPOOLFILE) JOB(*) SPLNBR(*LAST) +                 DESTTYP(*AS400) TRANSFORM(*NO) DLTSPLF(*NO) Where &SPOOLFILE is the name of the spoolfile. The spoolfile gets copied and everything is great.  BUT, the user is changing to QTMPLPD. As far as I [...]

Answer Question   |  May 31, 2011  7:57 PM
AS/400, AS/400 Spool Files, CLP, iSeries, SNDTCPSPLF
asked by:
465 pts.

what mon msg would i use in my CLP when checking for modules under my SBS?
I have a clp that checks modules/jobs that run under my subsystems.  I’m not sure what mon message it is giving me since none is shown if the job is not active. Only thing that is shown to me is the wrkactjob screen with (No active jobs to display). I would like for when this event occurs, [...]

Answer Question   |  January 31, 2011  6:58 AM
AS/400, AS/400 subsystems, AS400 CLP, CLP
asked by:
205 pts.

SBMJOB command
hi, I have a CLP which calls two programs A and B. A is submitted using SBMJOB command. My requirement is that after sucessfull completion of A i would like to condition program B. Is this possible? Thanks, Siddharth

Answer Question   |  January 27, 2011  12:50 PM
AS/400, CLP, OS/400, SBMJOB
asked by:
635 pts.

How to run a command within a CLP only during a specific time frame
I have a pgm that perfroms verious system checks and alerts me if there is a problem.  I would like to add an If statement to exclude some of the checks that fall between a certain time period and have it jump to a specific lable in the script to continue. thus skipping over the commands [...]

Answer Question   |  December 28, 2010  7:26 AM
AS/400, CL Commands, CLP, IF statement
asked by:
205 pts.