Is there a way to compile a huge amount of cobol programs at once instead of one by one?

Necesito compilar masivamente programas cobol de mi as400 versión 7.1  a versión 6.1. Existe alguna forma de compilar en forma masiva y no uno por uno?

I need to compile a lot of cobol programs from my as400 version 7.1 to version 6.1. Is there a way to compile a huge amount of cobol programs at once instead of one by one?
Edgar CastroAsked:
Who is Participating?
And Gary also makes a good point. I don't know if I've seen more than, say, one out of ten systems that had proper subsystem configurations. Nowadays, newer systems don't run into as much resource contention in almost any "normal" operation such that it's a big concern. But exceptions do exist; and without seeing a representative sample of workloads and schedules, it's mostly guesswork.

The question asked if compiles could all be done concurrently ("at once"), and the answer is "Yes." Whether that's a good idea using a default work management configuration is a different question that is answered starting with "It depends...".

A full answer probably should begin with something like "Let's review your system's work management configuration and your system's workloads and schedules. After ensuring a proper configuration, we will then look at compilation options." It's often more than a trivial task.
Martin MillerCTOCommented:
Can you create a script that will for a fork() and exec() operations for each program you need to build?
Gary PattersonVP Technology / Senior Consultant Commented:
Do you have PDM?
What is the source type on your COBOL source members (CBL, CBLLE, CBL36, CBL38, SQLCBL, SQLCBLLE)?

STRPDM, Option 2
Enter the COBOL source code library and source file (QLBLSRC, or QCBLLESRC usually).
Select option 14 on the first source member
Press F13 to copy option 14 to all members on the list
Press Enter

For more complex compiles, you may want to create a CL:
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

Easiest might simply be to submit compiles to batch through a multi-threaded *JOBQ such as QUSRNOMAX.
Gary PattersonVP Technology / Senior Consultant Commented:
Tom makes a good point: submitting to a job queue that is configured to allow multiple jobs at a time will be faster than compiling one at a time.  But if you have a lot of compiles, I don' think submitting them all to QUSRNOMAX (at least in its default state) is a good idea.

By default QUSRNOMAX jobq is attached to QUSRWRK subsystem, which by default uses *BASE memory pool.  Both the subsystem and the job queue are configured to allow an unlimited number of jobs to start (*NOMAX).  Submitting hundreds or thousands of jobs simultaneously to QUSRNOMAX is liable to swamp system with compiles.  I'd submit to a queue with a MAXACT initially no wider than 1-2x the number of processors in the system if performance of other work in the system matters, and bump it up experimentally as you observe impact on system performance and compile times.

Even more caution is needed in "single system/single LPAR" shops where the same system is used for development, testing, and production.
Gary PattersonVP Technology / Senior Consultant Commented:
@Tom:  I didn't read it quite the same.  I decided the question was probably more along the lines of "how to submit a mass compile", rather than literally "how to compile in parallel".

I'm picturing a list of source members in PDM that is hundreds of pages long, and a user faced with the prospect of going "14,14,14,14,14,14,14,14, page down" - over and over, and hoping there is a better way.

After reading your responses, however, I realize it could be PDM usage, work management, or, perhaps both:  how to submit in a single stroke, -and- manage effectively the number of simultaneous compile jobs.  So:

1) Configure a job queue to allow the desired number of simultaneous compiles.  I recommend 2x the number of processors as a starting point, and vary number up or down to govern how much system resources are used.

2) Modify PDM options to submit using a jobd referencing the job queue in step 1.

3) Modify PDM options to compile in batch.

Then follow the PDM mass compile submission steps outlined in my previous post.
Martin MillerCTOCommented:
Can we close this question?
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.