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

define data structure?

1 Answers   IBM,


How many Printer Files can Declare in a CL Program?

4 Answers  


What are the types of object authorities?

1 Answers  


when do you use f-spec. Continuation line ?

1 Answers   IBM,


Which command we can use to update a physical file using c.l pgm?

19 Answers   Ocwen,






How do I remove a flag or check no. or name when a user opens too many sessions?

0 Answers  


What is program status data structure(psds) in as400?

0 Answers  


1)In a pf if we delete a record then how to insert a new record at the same place in that pf?? any logic or code? 2)A batch job is taking a lot of time to run,found that it is going into loop and wrapping up so how to skip that loop and process the job without changing the code? 3)In which scenario C D I R comes and C D G F comes in a job? 4)If a job came to error while processing a file how we can know at which record the error hit and how to skip that record and process other records without changing program code?

0 Answers   JDA,


Logic cycle

1 Answers  


what is the difference between normal upddta to pf and updating using dfu program?

0 Answers   IBM,


How can we read file using curser? how to define a curser?

0 Answers  


Difference Between Call & Sbmjob?

0 Answers   IBM,


Categories