1
CL/QMQRY
i hav code STRQMQRY QMQRY(SQLPROC) OUTPUT(*OUTFILE) + OUTFILE(QTEMP/SQLDT) In SQLProc txt file i am callin a sql procedure , developed using i series navigator and return data set using cursor. i want this cursor output in qtemp/sqldt file. in sqlproc if i mentioned SELECT statment , then it will work fine, but i want [...]
Answer Question
| June 7, 2012 12:16 PM
AS/400, QMQRY, SQL procedure
i hav code STRQMQRY QMQRY(SQLPROC) OUTPUT(*OUTFILE) + OUTFILE(QTEMP/SQLDT) In SQLProc txt file i am callin a sql procedure , developed using i series navigator and return data set using cursor. i want this cursor output in qtemp/sqldt file. in sqlproc if i mentioned SELECT statment , then it will work fine, but i want [...]
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
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)) [...]
Forcing AS/400 query data to respect original data order
000012 FROM DISACTDTA1/COGJREP T02, 000013 DISACTDTA1/COGKREP T01, 000014 DISACTDTA1/COCXREP T04, 000015 DISACTDTA1/COGDREP T03, 000016 SATACTDTA1/FINURED T05 000017 WHERE GJEFZC = GKEFZC 000018 AND GKB8ZC = CXB8ZC 000019 AND T02.GJAN8X = T03.GDAN8X 000020 AND T01.GKB8ZC = T05.NUB8ZC 000021 AND( T02.GJCDZA = '001367' 000022 AND ZONED(GJASZB/100), 5) BETWEEN 10901 AND 10912 This is the result of [...]
Answer Question
| February 17, 2010 9:06 PM
*QRYDFN, AS/400 Query, QMQRY
000012 FROM DISACTDTA1/COGJREP T02, 000013 DISACTDTA1/COGKREP T01, 000014 DISACTDTA1/COCXREP T04, 000015 DISACTDTA1/COGDREP T03, 000016 SATACTDTA1/FINURED T05 000017 WHERE GJEFZC = GKEFZC 000018 AND GKB8ZC = CXB8ZC 000019 AND T02.GJAN8X = T03.GDAN8X 000020 AND T01.GKB8ZC = T05.NUB8ZC 000021 AND( T02.GJCDZA = '001367' 000022 AND ZONED(GJASZB/100), 5) BETWEEN 10901 AND 10912 This is the result of [...]
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
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 [...]
Display “No records found” in a QMQRY
I have a QMQRY that selects data from several files using left joins. Based on my “where” clause there is a possibility that no records will be selected. In this case, I want to be able to print “NO RECORDS FOUND” on the report. I have not been able to figure out how to get [...]
Answer Question
| April 10, 2009 1:38 PM
AS/400 error messages, AS/400 printing, QMQRY
I have a QMQRY that selects data from several files using left joins. Based on my “where” clause there is a possibility that no records will be selected. In this case, I want to be able to print “NO RECORDS FOUND” on the report. I have not been able to figure out how to get [...]
QMQRY not a valid Query Management variable.
Hi there, I am trying to pass parameters to QMQRY but get the following error. CALL PGM(JCCSTREP2) PARM(C165) ‘C165′ is not a valid Query Management variable. Error found on STRQMQRY command. CPF0001 received by JCCSTREP2 at 2800. (C D I R) the CL pgm that call the query is as follows: PGM PARM(&JOBX) DCL VAR(&JOBX) [...]
Answer Question
| February 23, 2009 7:12 AM
CL, CL programming, CL variables, QMQRY, STRQMQRY, Variables
Hi there, I am trying to pass parameters to QMQRY but get the following error. CALL PGM(JCCSTREP2) PARM(C165) ‘C165′ is not a valid Query Management variable. Error found on STRQMQRY command. CPF0001 received by JCCSTREP2 at 2800. (C D I R) the CL pgm that call the query is as follows: PGM PARM(&JOBX) DCL VAR(&JOBX) [...]
Problem in CCSID converting
I have a QM query that forms up a DB file. A physical file. A file that afterwards will be tranferred to the excel worksheet. All the source DB files (as well as all the records inside) that I use in the QM query are having the CCSID=297 (french). But the data itself stored in [...]
Answer Question
| January 22, 2009 5:09 AM
5250 session, AS/400, AS/400 import/export, CCSID, Change Physical File, CHGPF, Coded Character Set Identifier, DDS, iSeries Access for Windows, locale, Microsoft Excel, Physical File, QMQRY, Query Management Query, V5R3
I have a QM query that forms up a DB file. A physical file. A file that afterwards will be tranferred to the excel worksheet. All the source DB files (as well as all the records inside) that I use in the QM query are having the CCSID=297 (french). But the data itself stored in [...]
qmqry error – Help!
Can anyone help? I have a clp application that calls a qmqry which reads a large sales transaction file and selects and creats a small summary file of certain transactions for a certain typpe of part and date range. This sales transaction file is journaled and the file it creates becomes journaled? This part works [...]
Answer Question
| April 7, 2010 4:20 PM
AS/400 journaling, QMQRY, SQL
Can anyone help? I have a clp application that calls a qmqry which reads a large sales transaction file and selects and creats a small summary file of certain transactions for a certain typpe of part and date range. This sales transaction file is journaled and the file it creates becomes journaled? This part works [...]
qmqry outfile
I have a qmqry that we have had running in production for awhile with no problem. It is called from a cl. We create one workfile and then the second works with this file and joins to another creating a outfile in qtemp which we e-mail to user. This is the type of error we [...]
Answer Question
| March 12, 2010 5:35 PM
AS/400, QMQRY, QMQRY OUTFILE
I have a qmqry that we have had running in production for awhile with no problem. It is called from a cl. We create one workfile and then the second works with this file and joins to another creating a outfile in qtemp which we e-mail to user. This is the type of error we [...]
1





