IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Find the Copybook


IBM Mainframe Forums -> Mainframe Interview Questions
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
meharnafis

New User


Joined: 28 May 2008
Posts: 5
Location: Noida

PostPosted: Wed Jun 10, 2009 3:21 pm
Reply with quote

How to find out copy book for a dataset from the name of dataset used in the jcl only?
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Wed Jun 10, 2009 3:30 pm
Reply with quote

Ask your peers how they do it. This is a site specific question.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Wed Jun 10, 2009 3:30 pm
Reply with quote

ask development support, they know about the environment
Back to top
View user's profile Send private message
meharnafis

New User


Joined: 28 May 2008
Posts: 5
Location: Noida

PostPosted: Wed Jun 10, 2009 3:41 pm
Reply with quote

This is one of the interview questions that I was asked.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Wed Jun 10, 2009 3:53 pm
Reply with quote

one of the most stupid questions asked... icon_evil.gif

You cannot do it

there could be zillions of datasets with the same layout ( using the same copybook )

only the operations and application documentation can tell
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Wed Jun 10, 2009 4:03 pm
Reply with quote

As this is an interview question, a lay man kind of answer can be -- Using ISPF 3.14, search the JCL in which this DSN is created/used, pick the DD name from there and search that DD name in the COBOL source library. You'll get the program using that DD name and so the layout.

For the sake of discussion, let's assume there is only one copybook per DSN -- though what Enrico has said is the actual and practical situation. This question is kind of BS for an interview.
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Thu Jun 11, 2009 6:01 am
Reply with quote

A variation on Anuj's approach:

Once you find the dsn in the JCL (it will probable appear in more than 1 JOB or step), find the associated PGM that uses the DSN. Then look at the associated FD for the copybook. If not there, it's probably in WS. Check the READ/WRITE stmts for FROM/INTO.

I'll leave the rest up to you.
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Thu Jun 11, 2009 3:14 pm
Reply with quote

Thanks Jack -- that's rather straight forward. Not sure why did I not think to find the associated PGM that uses the DSN, ..mmmm... why in the heaven I thought to search in the "source-base-library" . . . icon_rolleyes.gif ... that's ofcourse time-consuming... icon_redface.gif
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Fri Jun 12, 2009 6:22 am
Reply with quote

Hi Anuj,

Thanx for the "attaboy". On another point, you said:
Quote:
This question is kind of BS for an interview

I don't know about that. Most pgmmrs spend a lot of time searching JCL/SOURCE Libs.

I think that if a pgmmr can't do that, (s)he operates under a handicap, so it might be something for an employer to look for.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> Mainframe Interview Questions

 


Similar Topics
Topic Forum Replies
No new posts To find whether record count are true... DFSORT/ICETOOL 6
No new posts REXX code to expand copybook in a cob... CLIST & REXX 2
No new posts Find the size of a PS file before rea... COBOL Programming 13
No new posts Trying to change copybook in online c... CICS 4
No new posts Help to Filter File Manager Copybook ... DFSORT/ICETOOL 14
Search our Forums:

Back to Top