This is already existing in RPGV3 program. they have declared 50 files in that program… now i want to change in that program for that i need to debug… so how can i re-compile it?
My comment should have concluded as “…you are doing something *wrong* and should fix it.” — Tom
Yes, RUNSQLSTM cannot process a simple SELECT statement. It needs to be a sub-select that tells a different statement what rows to process. Most likely that would be an INSERT rather than a simple SELECT.
.
A SELECT statement doesn’t actually do anything with rows from a table. It simply ‘selects’ the rows.
.
Tom
You should contact the Support group for your ISP. We don’t know your OS, nor your e-mail client. We don’t know what you mean by “message”. You might be using any of the various messaging protocols. We don’t know what authorities or permissions you might have to make changes.
.
Tom
CharlieBrowne is right. We don’t know how to determine which employees need what changes. In general, you would probably need a loop in the program. The RCVF command would read a record from some file that links each user profile to a company and possibly a group profile name. Then you’d run a CHGUSRPRF command to make the appropriate change to that user profile. The loop would go back to RCVF the next record.
.
Or you might use the DSPUSRPRF command to list all users to an outfile, and check each one for some attribute that controls your CHGUSRPRF logic. If you don’t already have a file that controls your logic, that might be how it will be done. Or you might use an API to build a list of profiles, and then process the list. Or you might need to connect to multiple files for your control values.
.
We simply don’t know what you actually have that would let us know what any programming can do.
.
You need to create at least the general programming so we have something to follow. Changing user profiles for group (and possibly needing supplemental groups for any users that already are group members) is not something that we can simply throw together. This has direct and serious security implications that apparently affects multiple companies. Liability is potentially high, and that doesn’t cover simple business disruptions that might result.
.
Tom
Do you have Excel installed on your system? Or more likely do you have Microsoft Office, which includes Excel? (Apparently not.)
.
For Windows 7 Home, you might have a basic “Starter” version of the Microsoft Office product; but for any significant accounting package, you will likely need to purchase and install Microsoft Office in order to get a version of Excel that the accounting product can use.
.
Tom
On most systems, a general text editor can “open” and read any file. It’s often fairly useless to do it unless you understand what you’re doing. In order to make actual use of a file, you need a program that was written with logic that is appropriate to the file’s structure and data. Therefore, you would open the file with whatever application created the file.
.
The extension (.TST in this case) is no guarantee of anything. Anyone can create a file with that extension any time they choose with any data they want and with any internal structure. Files can also be renamed to have different extensions.
.
An extension such as .TST could have anything imaginable in it. I’ve created such files far more times than I can remember simply because it’s an obvious reference to a “test” file. Even trivial applications that I’ve created have used that extension.
.
In short, it’s unlikely anyone can guess what to do with that file without close examination. If you created it, you’re probably the only one who knows what to do with it. And if you didn’t create it, you need to ask the creator.
.
Tom
We need more informaiton.
What Hardware / Software are you trying to do this with?
You will need to create the program because we do not have your criteria for changes.
How do you know what company a USRPRF is affiliated with?
If you can get that into a DB file, you can do a quick CL program that reads the file and has logic to CHGUSRRPF depending on company.
And if you convert this program to RPGLE you won’t have a limti.
But the foregoing advice is still good.
Call a new program to do your new/modified task.
You might have gotten a spool file with details ..
SQL9010 30 RUNSQLSTM command failed.
Doesn’t tell us much ..
I think that you may have wanted an INSERT INTO TofileName
followed by your select clause..
How was it created? Use that same application to open it.
Do you know what it is? If not, why try to open it.
SQL9010 received by procedure CL2700,Below is the sql txt i used for RUNSQLSTM
SELECT M$NACI, M$NADT, M$DARI FROM d502087810/J$SCMS@ WHERE
(
M$NACI like (‘_8%’) or M$NACI like (‘_1%’) or M$NACI like (‘_2%’)
or M$NACI like (‘_4%’) or M$NACI like (‘_3%’) or M$NACI like
(‘_5%’) or M$NACI like (‘_9%’))
and M$NACI not like (‘% ‘) and
M$DARI not in (‘INACTIVE’) and M$DUARI not in (‘INACTIVE’) ORDER BY
M$NACI
please advice me
I would put my SQL into a member of a source file
— usually QSQLSRC — member type TXT
And create a CL with the RUNSQLSTM command — set the commitment control to *NONE
Tom
Looks to me like you’ve got it.
Phil
If you need 50 + files in one program I’d like to know why. You should think about breaking in down into procedures to handle individual tasks. It also makes things easier to maintain if the code is modularized and kept small. No one likes to debug a 50K line program.
You can go old school cycle (RPG II) and make your file Input Primary. Using L1,L2 indicators to show breaks …. But why would you want to do this ??
i need to create this program schedule a job which runs at particular time.please help me in this thanks in advance
i tried to do with the Open query file with rcdslt and CPYFRMQRYF but this sql querie has “like” and not able to use it







