Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hi, My question is as follows -

Status
Not open for further replies.

Previndra

Programmer
Oct 1, 2002
4
IN
Hi,

My question is as follows -

How to open output files based on no of outputs. For an example while separate report creation for each categories which is not known in the begining.

Thanks in advance and warm regards!

Yours

Previndra Sharma
System Analyst
 
Hi Previndra,

Many COBOL compilers will accept a SELECT statement that ASSIGNs to, for example, #DYNAMIC (a special name that says that you will assign a file name at run-time).

In your logic, you will then construct the real file name, call an ASSIGN utility (that comes with many compilers) to execute the ASSIGNment).

When you need to OPEN another file name, simply CLOSE the current file, execute another ASSIGN, and OPEN the new file. This lets you reuse the same SELECT to access multiple files.

See if your compiler gives you these options.

Dimandja
 
Hi Previndra,

Any luck?

Which compiler/OS are you using?

Dimandja
 
Hi,

Thanks a lot for your valuable suggestion.

I am using MF-Cobol, AIX on rs-6000 machine and Oracle.

reagrds!

Previndra Sharma
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top