Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

How to print gdg dataset in output report of cobol program

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
rsawla

New User


Joined: 06 Feb 2008
Posts: 1
Location: hyderabad

PostPosted: Sat Feb 07, 2009 8:14 am    Post subject: How to print gdg dataset in output report of cobol program
Reply with quote

Hi Friends,

There is an existing cobol program which access the gdg files and print
totals in a report from those files.In the report i want to print the
GDG dataset name also.I think it can be done by invoking idcams but
not sure of the syntax.Please share the code and jcl for the same.
Back to top
View user's profile Send private message

dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Sat Feb 07, 2009 8:53 am    Post subject:
Reply with quote

Hello and welcome to the forum,

IDCAMS can be invoked, but in order for IDCAMS to provide dataset info, you need to give it the dataset name.
Back to top
View user's profile Send private message
Gnanas N

Active Member


Joined: 06 Sep 2007
Posts: 788
Location: Chennai, India

PostPosted: Sat Feb 07, 2009 8:55 am    Post subject:
Reply with quote

These links might help you.

http://www.ibmmainframes.com/about22131.html
http://ibmmainframes.com/viewtopic.php?t=2164&highlight=idcams
Back to top
View user's profile Send private message
Douglas Wilder

Active User


Joined: 28 Nov 2006
Posts: 305
Location: Deerfield IL

PostPosted: Tue Feb 10, 2009 2:16 am    Post subject:
Reply with quote

If you want to print the absolute generation when you know the relative generation I use the following type of JCL:
Code:
//STEP10  EXEC PGM=IDCAMS                                     
//DD1       DD DSN=HLQ.xxx.STEPxx.DSN(+1),DISP=SHR     
//DD2       DD DSN=HLQ.xxx.STEPxx.DNS2(0),DISP=SHR
//SYSPRINT  DD SYSOUT=*
//SYSIN     DD *                                             
 PRINT INFILE(DD1) COUNT(0) CHAR                             
 PRINT INFILE(DD2) COUNT(0) CHAR                             
/*                                                           
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Tue Feb 10, 2009 3:33 am    Post subject:
Reply with quote

Hello,

If i understand the request, the question is how to get the dataset name into the running program. . . So that it can be used/printed within the program.

If i misunderstand, please clarify.
Back to top
View user's profile Send private message
amar_401

New User


Joined: 20 Sep 2006
Posts: 7

PostPosted: Fri Feb 13, 2009 3:14 am    Post subject:
Reply with quote

As the GDG Name will be standard use PARM to send the GDG name to the Cobol Program
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4649
Location: Raleigh, NC, USA

PostPosted: Fri Feb 13, 2009 3:31 am    Post subject: Reply to: How to print gdg dataset in output report of cobol
Reply with quote

Did This previous topic Cobol: how to get the DSName from the DDame help?
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Fri Feb 13, 2009 3:58 am    Post subject:
Reply with quote

Hello,

Quote:
As the GDG Name will be standard use PARM to send the GDG name to the Cobol Program
An incomplete assumption at best. . .

The request is for the code to retrieve the dsn from the system - if we understand the request. . . Why assume the dsn would be standard? What if the same format data was in multiple gdg's that might be input?

It would be helpful if rsawla would provide the proper info. . .
Back to top
View user's profile Send private message
amar_401

New User


Joined: 20 Sep 2006
Posts: 7

PostPosted: Sat Feb 14, 2009 1:32 am    Post subject:
Reply with quote

Hey,

I am confused now with the requirement. Do u just want to print the GDG name used in the JCL as input or do you want to print the GDG name along with the version number.

If you want to print the GDG name then we can pass the GDG name through PARM because the GDG is already used in the JCL as Input so you know the name then what is the problem...
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Sat Feb 14, 2009 1:55 am    Post subject:
Reply with quote

Hello,

Quote:
I am confused now with the requirement.
As are others icon_confused.gif

As mentioned previously:
Quote:
It would be helpful if rsawla would provide the proper info. . .
Until some clarification is given, all we are doing is shooting in the dark.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Browse dataset cvnlynn CLIST & REXX 4 Tue Jul 18, 2017 3:52 am
No new posts XML Parse for COBOL 5.2 Bhanu Praveen COBOL Programming 1 Sat Jul 08, 2017 8:58 pm
No new posts How to add header with Date(YYMMDD) i... Rajan Moorthy DFSORT/ICETOOL 2 Thu Jul 06, 2017 11:44 pm
No new posts Writing a file using online program grvtomar PL/I & Assembler 3 Fri Jun 30, 2017 1:06 pm
No new posts JES2 doesn't honor the priority of th... Aron Lendvai JCL & VSAM 7 Thu Jun 29, 2017 1:41 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us