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 DECIMAL DATA ERROR IN RPG IV...WHEN WILL IT HAPPENS?

6 Answers   CTS,


what is the length of a variable in rpg?

1 Answers   IBM,


what are the important factors in error message subfile ?

0 Answers   IBM,


which cl command can be used at program execution to redirect the file named in an rpg program?

0 Answers   IBM,


what is cab?

0 Answers   IBM,






What is the default value for the number of increment for the physical file?

1 Answers  


it is possible declare variable values as variable using cl ? any cl command is there to declare values as variable

2 Answers  


Describe the function of SETLL operation in RPG language?

1 Answers  


PGM QSH CMD('/QOpenSys/bin/sftp -b/home/test/myfile.txt serverUserID@server') ENDPGM In above example,what is content of myfile.txt ...Thanx

2 Answers  


during input operation which indicator position is seton if there is a record lock?

1 Answers   IBM,


how to read database records without locking them?

1 Answers   IBM,


what is the command to know key fields of file?

0 Answers   IBM,


Categories