CL: AS/400 question
As/400 question: I am declaring 3 files in CL-ILE, How will CL differentiate between those 3 files? Will it be through the record format names? Does the concept of OPNID come into picture? Can anyone throw some light on what is OPNID and how CL can differentiate more than 1 file when it is declared? [...]
Answer Question
| February 6, 2013 8:14 AM
AS/400, CL
As/400 question: I am declaring 3 files in CL-ILE, How will CL differentiate between those 3 files? Will it be through the record format names? Does the concept of OPNID come into picture? Can anyone throw some light on what is OPNID and how CL can differentiate more than 1 file when it is declared? [...]
Converting julian date with CL on the AS400
Can anyone help me with correcting the following code? I believe the error is in the /* CONVERT TO 30 DAYS AGO */ area, but I can’t see it. ********************************************************************************* DCL &TODAY *CHAR 6 DCL &LESS30 *CHAR 6 DCL &MBRDATE *CHAR 5 DCL VAR(&MBRDAT2) TYPE(*DEC) LEN(5 0) /* CONVERT TODAY’S DATE TO JULIAN */ RTVSYSVAL [...]
Answer Question
| January 10, 2013 1:47 AM
AS/400, CL
Can anyone help me with correcting the following code? I believe the error is in the /* CONVERT TO 30 DAYS AGO */ area, but I can’t see it. ********************************************************************************* DCL &TODAY *CHAR 6 DCL &LESS30 *CHAR 6 DCL &MBRDATE *CHAR 5 DCL VAR(&MBRDAT2) TYPE(*DEC) LEN(5 0) /* CONVERT TODAY’S DATE TO JULIAN */ RTVSYSVAL [...]
Help with CL to answer MSGW on printer WTR
I have been out of programming for a few years, and am pretty rusty. We run a system that the end users have no command line access. Their printers have occasion to go into MSGW status (ie out of paper, etc.). They then have to call to get support to answer the MSGW on the [...]
Answer Question
| November 1, 2012 12:52 PM
*SPLCTL, CL, MSGW
I have been out of programming for a few years, and am pretty rusty. We run a system that the end users have no command line access. Their printers have occasion to go into MSGW status (ie out of paper, etc.). They then have to call to get support to answer the MSGW on the [...]
Compare creation date of file to system date
Hi, I need help in figuring out the begaining of my CL program. I would like for the CL to act accordinly. Check a file creation date and compare that date to the system date, then if a match (do something), if not a match (send message and end job). Thank you
Answer Question
| October 23, 2012 6:48 AM
AS/400, CL
Hi, I need help in figuring out the begaining of my CL program. I would like for the CL to act accordinly. Check a file creation date and compare that date to the system date, then if a match (do something), if not a match (send message and end job). Thank you
Outfile printing
In CL, I’ve created a outfile out of dspobjd cmd. To this file, i’ve filtered a column using opnqryf. I’ve copied the output (cpyqryf) to a new file. While doing this, i’m getting the error data option was not allowed with open option’ The log shows :The first file is created-> added to library. Seqonly [...]
Answer Question
| October 16, 2012 7:14 AM
CL, cpyqryf, OPNQRYF, RPG, RPGLE
In CL, I’ve created a outfile out of dspobjd cmd. To this file, i’ve filtered a column using opnqryf. I’ve copied the output (cpyqryf) to a new file. While doing this, i’m getting the error data option was not allowed with open option’ The log shows :The first file is created-> added to library. Seqonly [...]
Problem with CMD/CL and *PNAME type (Path name contains embedded nulls.)
So I am giving a good effort into writing a CL/CMD pair to start one of our programs from the command line, but I’ve hit a snag. Here is my CMD source: CMD PROMPT(‘Start Engine’) PARM KWD(PGM) TYPE(*NAME) LEN(10) DFT(‘TRAN_ENGV2′) PROMPT(‘Engine Program Name’) PARM KWD(PATH) TYPE(*PNAME) MIN(1) PROMPT(‘IFS Directory’) PARM KWD(PORT) [...]
Answer Question
| October 10, 2012 3:30 PM
CL, CMD Source, i7, V7R1
So I am giving a good effort into writing a CL/CMD pair to start one of our programs from the command line, but I’ve hit a snag. Here is my CMD source: CMD PROMPT(‘Start Engine’) PARM KWD(PGM) TYPE(*NAME) LEN(10) DFT(‘TRAN_ENGV2′) PROMPT(‘Engine Program Name’) PARM KWD(PATH) TYPE(*PNAME) MIN(1) PROMPT(‘IFS Directory’) PARM KWD(PORT) [...]
CL – OVRDBF
I am executed the below statements using CL. FileA got deleted. I want to know the reason. Please help me to understand the logic. PGM OVRDBF FILE(TESTPF) TOFILE(TESTPF1) OVRDBF FILE(TESTPF1) TOFILE(TESTPF2) OVRDBF FILE(TESTPF2) TOFILE(TESTPF) DLTF FILE(TESTPF) DLTOVR FILE(*ALL) ENDPGM FILEA got deleted. What is the reason?
Answer Question
| October 4, 2012 11:10 AM
CL, OVRDBF
I am executed the below statements using CL. FileA got deleted. I want to know the reason. Please help me to understand the logic. PGM OVRDBF FILE(TESTPF) TOFILE(TESTPF1) OVRDBF FILE(TESTPF1) TOFILE(TESTPF2) OVRDBF FILE(TESTPF2) TOFILE(TESTPF) DLTF FILE(TESTPF) DLTOVR FILE(*ALL) ENDPGM FILEA got deleted. What is the reason?
Multiple display file in CL program
I need to have one screen where a user can enter some information, lets say customer number then when they press enter that information will be shown in text on the second screen. So lets say the user enters 321 for customer number and then the second screen needs say “The customer number processed was [...]
Answer Question
| August 20, 2012 3:31 PM
CL
I need to have one screen where a user can enter some information, lets say customer number then when they press enter that information will be shown in text on the second screen. So lets say the user enters 321 for customer number and then the second screen needs say “The customer number processed was [...]
reading a pf in reverse order using cl program
Hi, How to read a physical file in reverse order using cl program ny example with coding would ne much helpful. Thanks. any sample code would be verymuch helpful
Answer Question
| September 1, 2012 4:09 PM
CL
Hi, How to read a physical file in reverse order using cl program ny example with coding would ne much helpful. Thanks. any sample code would be verymuch helpful
RPGLE opcode similar to SNDF in CL
Is there any way we can display a message “Processing” while the program is building the data in a subfile. In CL we can use the SNDF command to send such message to the display. Please help.
Answer Question
| June 1, 2012 10:43 AM
CL, RPGLE, SNDF
Is there any way we can display a message “Processing” while the program is building the data in a subfile. In CL we can use the SNDF command to send such message to the display. Please help.
level check error
I currently have a DSPF & a CL that work. I added a field to the DSPF and added logic to the CL to use the new field. Both compiled successfully (DSPF and then CL). When I run the CL, I am getting a CPF4131 (level check). The CL is pointing to the correct DSPF. [...]
Answer Question
| May 29, 2012 1:06 PM
AS/400, CL, DSPF, iSeries
I currently have a DSPF & a CL that work. I added a field to the DSPF and added logic to the CL to use the new field. Both compiled successfully (DSPF and then CL). When I run the CL, I am getting a CPF4131 (level check). The CL is pointing to the correct DSPF. [...]
CPYFRMIMPF Issue
I am trying to copy data from a .txt file to a physical file and I keep receiving an error code 7. My text file is not delimited at all, but my physical file is composed of about 20 separate fields. Does my ‘from file’ have to be delimited to use this command? Is that [...]
Answer Question
| April 23, 2012 6:06 PM
AS/400, CL, CPYFRMIMPF
I am trying to copy data from a .txt file to a physical file and I keep receiving an error code 7. My text file is not delimited at all, but my physical file is composed of about 20 separate fields. Does my ‘from file’ have to be delimited to use this command? Is that [...]
Sorting alphanumeric field with hexadecimal values
We have a task where we have to convert key numeric field (8,0) to alphanumeric field (8A) with hexadecimal values (’00000000′ – ‘FFFFFFFF’). The problem in sorting with alphanumeric is the alphabet is less than the numeric value (A-Z < 0-9). Is there a way, by LF or any AS400 utility, that can sort hexadecimal [...]
Answer Question
| March 23, 2012 4:17 PM
AS/400, CL, RPG
We have a task where we have to convert key numeric field (8,0) to alphanumeric field (8A) with hexadecimal values (’00000000′ – ‘FFFFFFFF’). The problem in sorting with alphanumeric is the alphabet is less than the numeric value (A-Z < 0-9). Is there a way, by LF or any AS400 utility, that can sort hexadecimal [...]
Navigation from one sheet to another in AS400(RPGLE)
I have converted two physical files into one flat file.Afterthat I have converted that flat file to CSV file and got two physical files data in one excel file. But I need to write first phsical files data in sheet1 and second physical file data in sheet2 in same excel file.Is there any way [...]
Answer Question
| February 27, 2012 3:16 PM
CL, RPGLE
I have converted two physical files into one flat file.Afterthat I have converted that flat file to CSV file and got two physical files data in one excel file. But I need to write first phsical files data in sheet1 and second physical file data in sheet2 in same excel file.Is there any way [...]
Want to make a utility to search string.
[h3 class="groups"> Hi,[/h3] [h3 class="groups">I want to make a utility in AS400 to search a string (Such as file name/PGM name) in my current Library and in all Source physical files if found show PGM and all related files. Like I do trough find string Command. [/h3] It would be also help ful you can [...]
Answer Question
| March 17, 2012 3:09 PM
CL, CLLE, RPG, RPGLE
[h3 class="groups"> Hi,[/h3] [h3 class="groups">I want to make a utility in AS400 to search a string (Such as file name/PGM name) in my current Library and in all Source physical files if found show PGM and all related files. Like I do trough find string Command. [/h3] It would be also help ful you can [...]
Calling query/400 through CL
Hi, Is it possible to call query/400 through a CL program? Please suggest some idea.. Thanks, Jayashree V.
Answer Question
| March 17, 2012 4:45 AM
CL, Query/400
Hi, Is it possible to call query/400 through a CL program? Please suggest some idea.. Thanks, Jayashree V.
Automating SNDNETSPLF in CL
I want to use SNDNETSPLF to automatically copy each occurance of a specific spool file to another outq for archiving purposes. The spool file name will always be the same. To use SNDNETSLF I need to enter the Jobname, User & job number etc. How do I automate the command?
Answer Question
| March 17, 2012 12:19 PM
CL, Jobname, SNDNETSPLF
I want to use SNDNETSPLF to automatically copy each occurance of a specific spool file to another outq for archiving purposes. The spool file name will always be the same. To use SNDNETSLF I need to enter the Jobname, User & job number etc. How do I automate the command?
Can specific options within the Go perform menu be called by a program?
Can specific options within the Go perform menu be called by a program?
Answer Question
| December 13, 2011 5:42 AM
AS/400, CL, iSeries, Performance monitoring, PM/400
Can specific options within the Go perform menu be called by a program?
Auto reply to CL-created messages
Is there a way to automatically reply to either the SNDUSRMSG or SNDPGMMSG commands?
Answer Question
| March 31, 2012 5:42 PM
Autoreply, CL, CL programs, SNDPGMMSG, SNDUSRMSG
Is there a way to automatically reply to either the SNDUSRMSG or SNDPGMMSG commands?
OVRDBF without any parameters specified
Can we specify an overide statement without actually specifying any parameters to be overridden. In one of the exisiting codes (in a CL)I saw a line as follows: OVRDBF File(ZFT00981) ToFile(ZFT00981) No parameters were specified. The file name is exactly same. The program is being used since ages. Hence I know this will not result [...]
Answer Question
| May 30, 2011 9:54 AM
AS/400, AS/400 Parameters, CL, CL Parameters, iSeries, OVRDBF
Can we specify an overide statement without actually specifying any parameters to be overridden. In one of the exisiting codes (in a CL)I saw a line as follows: OVRDBF File(ZFT00981) ToFile(ZFT00981) No parameters were specified. The file name is exactly same. The program is being used since ages. Hence I know this will not result [...]





