Code Comments
Programming Forum and web based access to our favorite programming groups.Hi, I have got a common C module running on OS/390 , which will write to separate DD SYSOUT files (for different programmes). We have setup separate DDs for each transaction/programmes (for ex: //PROGAOUT DD DISP=SHR,DSN= MVSSYS.SUMMIT.OUTPUTA defined in the startup job of the WLM) , so that the common C module will write to those SYSOUT DDs depending on whatever DD name is passed into it. The module is running in the WLM of DB2 . Question is, once the DDs have been setup by the system programmers, how do I write to each DD ? i.e. Can i just issue a fopen("DD:PROGAOUT","a+") , which will do the trick? Please note that each caller to this C programme will pass in the DD name (PROGAOUT in this case). Please advise. Summit
Post Follow-up to this messageIn article <e18daabc.0412191355.76897a80@posting.google.com>, sumit.sengupta@gmail.com (summit) wrote: > Hi, > > I have got a common C module running on OS/390 , which will write to > separate DD SYSOUT files (for different programmes). > > We have setup separate DDs for each transaction/programmes > (for ex: > //PROGAOUT DD DISP=SHR,DSN= MVSSYS.SUMMIT.OUTPUTA defined in the > startup job of the WLM) , so that the common C module will write to > those SYSOUT DDs depending on whatever DD name is passed into it. > > The module is running in the WLM of DB2 . > > Question is, once the DDs have been setup by the system programmers, > how do I write to each DD ? i.e. Can i just issue a > fopen("DD:PROGAOUT","a+") , which will do the trick? > > Please note that each caller to this C programme will pass in the DD > name (PROGAOUT in this case). > > Please advise. > > Summit It depends. If you are using LE you can use the file number and CEEMOUT function.
Post Follow-up to this messageJoe Zitzelberger writes ... >In article <e18daabc.0412191355.76897a80@posting.google.com>, > sumit.sengupta@gmail.com (summit) wrote: > > >It depends. > >If you are using LE you can use the file number and CEEMOUT function. > No. CEEMOUT only allows an output file number of '2', and that goes to the L E message file. I'm not totally sure what the original poster wants to do, but my guess is i t can't be done the way they describe it. To say "The module is running in the WLM of DB2 . " makes no contextual sen se. Perhaps they are using stored procedures. In that case, they mean to say something like "The module is running as a DB2 stored procedure in a WLM-managed stored procedure address space." If that's the case, the solutio n is to use the RUN OPTIONS clause of CREATE PROCEDURE or ALTER PROCEDURE and for each procedure use a different DD-name for the MSGFILE option. On the other hand, perhaps the situation is not using stored procedures. Hope this helps a little. Kind regards, -Steve Comstock -Steve Comstock 800-993-9716 303-393-8716 www.trainersfriend.com email: steve@trainersfriend.com 256-B S. Monaco Parkway Denver, CO 80224 USA
Post Follow-up to this messagePowered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.