I have to execute 12000 CL Commands one by one..
So, I have created a file called COMMAND.
This file has only 1 field called STRING.
This file had 12000 records, and all these records are CL Commands (ex: CALL PGM(PGM1)), etc)
I have written a CL which will read all the record and do sbmjob..
But it is not working...
Plz help me to exexute all these 12000 commands..

Answers were Sorted based on User's Feedback



I have to execute 12000 CL Commands one by one.. So, I have created a file called COMMAND. This fi..

Answer / alok.yee001

Use QCMDEXC command to execute the string from file.
Pass the string from file to QCMDEXC command.

Is This Answer Correct ?    3 Yes 0 No

I have to execute 12000 CL Commands one by one.. So, I have created a file called COMMAND. This fi..

Answer / gagan44

In CL programming,it should not be a problem to execute any command.
We don't have to use QCMDEXC in CL.If there are for eg 100 RTV commands then firstly the variables to retrieve should be declared in the program .But if the command are only CALL commands then Using QCMDEXC will solve the purpose.

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More IBM AS400 AllOther Interview Questions

What is primary file? How many primary file can be declared in a RPG program?

3 Answers   IBM, Valtech,


Write a CL program which will run a batch job at 1 am every night

0 Answers  


does we use case stmt in cl

1 Answers  


Job is running in production 24/7 how do u debug that running job ?

1 Answers   Wipro,


I need to insert a record in a file using STRSQL containing the some field values same as an already existing record in that file.I know to smple insert mentioning those values one by one.But is there any another query can be prepared for the same .Please share the query if known to you. Thanks in advance.

0 Answers   CSC,






what keyword must be used with protect keyword ?

1 Answers   IBM,


What is the purpose of PR and PI in calling program and called program? in Called program PR is compulsory?

1 Answers   HCL,


What are the types of Signature validation?

1 Answers  


What is library is as400? What are the types of library?

1 Answers  


What is a Member?

1 Answers  


What is the maximum number of times Multiple Occurrences DS can occur in a program?

1 Answers  


write the SQL statement to retrieve the 2nd Highest salary ammount(File Name="EMPLOY",Field Name="SALARY")

6 Answers   Bally Technologies, Cognizant, Vertex,


Categories