GDG interview question
Moderator: Moderator Group
GDG interview question
Hi All,
I have 2 questions on GDG
QUES1 :
A Job has 3 steps
1) Step01 creating New GDG file(+),
2) Step02 Input from step01
3) Step03 Input from Step02
When we run this job, it gets an abend in step02, so when we restart the job what will be the version of file. ???
QUES2: A Job has 3 steps
1) Step01 creating New GDG file(+),
2) Step02 Delete file(+),
3) Step03 create new GDG file with same file name
What is the version for that file?
I have 2 questions on GDG
QUES1 :
A Job has 3 steps
1) Step01 creating New GDG file(+),
2) Step02 Input from step01
3) Step03 Input from Step02
When we run this job, it gets an abend in step02, so when we restart the job what will be the version of file. ???
QUES2: A Job has 3 steps
1) Step01 creating New GDG file(+),
2) Step02 Delete file(+),
3) Step03 create new GDG file with same file name
What is the version for that file?
SONA KASI
Basically, you need to rethink the question.
When you create a (+1) you are creating a new generation NOT a new version. There is such a thing as a version, but you should probably never try to use it - it is almost never used in business application processing.
q1
If step one successfully creates a new generation, it will susvive the abend in step2.
q2
Well managed systems will not permit this kind of job to exist. . . There is neither a technical nor a business reason to handle a gdg this way.
When you create a (+1) you are creating a new generation NOT a new version. There is such a thing as a version, but you should probably never try to use it - it is almost never used in business application processing.
q1
If step one successfully creates a new generation, it will susvive the abend in step2.
q2
Well managed systems will not permit this kind of job to exist. . . There is neither a technical nor a business reason to handle a gdg this way.
Have a good one
-
- Moderator
- Posts: 1625
- Joined: Sat Aug 09, 2008 9:02 am
- Location: Mumbai, India
For the sake of an answer, for question 2, if the Job is like this:
You'll have HLQ.FIRST.GDG..G0001V00.
Code: Select all
//STEP01 EXEC PGM=IEFBR14
//SYSUT1 DD DSN=HLQ.FIRST.GDG(+1),
// DISP=(NEW,CATLG,DELETE),
// UNIT=SYSDA,RECFM=FB,LRECL=80,
// SPACE=(CYL,(1,1),RLSE)
//*
//STEP02 EXEC PGM=IEFBR14
//SYSUT2 DD DSN=HLQ.FIRST.GDG(+1),
// DISP=(MOD,DELETE,DELETE)
//*
//STEP03 EXEC PGM=IEFBR14
//SYSUT3 DD DSN=HLQ.FIRST.GDG(+1),
// DISP=(NEW,CATLG,DELETE),
// UNIT=SYSDA,RECFM=FB,LRECL=80,
// SPACE=(CYL,(1,1),RLSE)
Regards,
Anuj
Anuj
No, that is not right.
Version 0 has NOTHING to do with anything in this topic. You really should forget the such a thing as a "version" even exists until such time that ever does become an issue. 99.999% of application developers NEVER use "version" - always generation.
The last generation created can be used by coding dsn(0) in subsequent jobs. This is relative generation (as opposed to actual/specific generation. It is NOT version.
Version 0 has NOTHING to do with anything in this topic. You really should forget the such a thing as a "version" even exists until such time that ever does become an issue. 99.999% of application developers NEVER use "version" - always generation.
The last generation created can be used by coding dsn(0) in subsequent jobs. This is relative generation (as opposed to actual/specific generation. It is NOT version.
Last edited by DikDude on Thu Jan 05, 2012 11:32 pm, edited 1 time in total.
Have a good one
-
- Moderator
- Posts: 1625
- Joined: Sat Aug 09, 2008 9:02 am
- Location: Mumbai, India
Looks like you've confused yourself with my answer. Sometimes, Interviewers are of thick skin and they need answer for everything they vomit in front of you - I thought my answer will help you to understand it better for next interview.
I did not get in "version" and "generation" discussion becasue DikDude has explained it very cleary, however, for my $.02, I'll talk about it:
"Version" and "generation" does have their meaning when talking about GDGs. However, when you code HLQ.FIRST.GDG(+1) -- next GENERATION gets created. No version (V00 to V01 or whatever you can think of) increments/changes happen, whatsoever. Version is still "00". Said that, You can still create the next version BUT neither it's advised nor it will be 'attached' to the GDG-base.
If generation HLQ.FIRST.GDG.G0001V00 is cataloged and you now create and catalog HLQ.FIRST.GDG.G0001V01, this is just another DSN but as the "base" is same, the new entry is cataloged in the location previously occupied by HLQ.FIRST.GDG.G0001V00. The old entry is removed from the catalog, to make room for the newer version, and may or may not be scratched depending on what limit processing options are specified for the GDG base.
Said all that - with the rank question you've asked, suggest you just remember - at given isntant only one version of a GDG is existing. Just DON'T PLAY WITH VERSION.
For your response to my reply - I'd say -- please try executing the job with proper job-card, having only first step, then first two steps and then all the three steps.
I did not get in "version" and "generation" discussion becasue DikDude has explained it very cleary, however, for my $.02, I'll talk about it:
"Version" and "generation" does have their meaning when talking about GDGs. However, when you code HLQ.FIRST.GDG(+1) -- next GENERATION gets created. No version (V00 to V01 or whatever you can think of) increments/changes happen, whatsoever. Version is still "00". Said that, You can still create the next version BUT neither it's advised nor it will be 'attached' to the GDG-base.
If generation HLQ.FIRST.GDG.G0001V00 is cataloged and you now create and catalog HLQ.FIRST.GDG.G0001V01, this is just another DSN but as the "base" is same, the new entry is cataloged in the location previously occupied by HLQ.FIRST.GDG.G0001V00. The old entry is removed from the catalog, to make room for the newer version, and may or may not be scratched depending on what limit processing options are specified for the GDG base.
Said all that - with the rank question you've asked, suggest you just remember - at given isntant only one version of a GDG is existing. Just DON'T PLAY WITH VERSION.
For your response to my reply - I'd say -- please try executing the job with proper job-card, having only first step, then first two steps and then all the three steps.
Regards,
Anuj
Anuj
-
- Member
- Posts: 25
- Joined: Sun Feb 05, 2012 10:59 pm
- Location: Bangalore
A Job has 3 steps
1) Step01 creating New GDG file(+),
2) Step02 Input from step01
3) Step03 Input from Step02
When we run this job, it gets an abend in step02, so when we restart the job what will be the version of file. ???
when it gets abend step01 has already run so step01 creates a new +1 version. so when you rerun it again it'll create the new version.
QUES2: A Job has 3 steps
1) Step01 creating New GDG file(+),
2) Step02 Delete file(+),
3) Step03 create new GDG file with same file name
What is the version for that file?
it creates a new version.
correct me if i'm wrong..
1) Step01 creating New GDG file(+),
2) Step02 Input from step01
3) Step03 Input from Step02
When we run this job, it gets an abend in step02, so when we restart the job what will be the version of file. ???
when it gets abend step01 has already run so step01 creates a new +1 version. so when you rerun it again it'll create the new version.
QUES2: A Job has 3 steps
1) Step01 creating New GDG file(+),
2) Step02 Delete file(+),
3) Step03 create new GDG file with same file name
What is the version for that file?
it creates a new version.
correct me if i'm wrong..
-
- Member
- Posts: 25
- Joined: Sun Feb 05, 2012 10:59 pm
- Location: Bangalore
here i mean generation..
when you give (+1) it always creates generation.. i dont understand why you people were talkin about version??
e.g:
//outdd dsn dd=test.gdgbase(+1),
// disp=(,catlg,)
// ..
it always creates test.gdgbase.g0002v00 provided test.gdgbase0001v00 was the previous gdg..
so my ques. is when you give (+1) why the new version will create ?
when you give (+1) it always creates generation.. i dont understand why you people were talkin about version??
e.g:
//outdd dsn dd=test.gdgbase(+1),
// disp=(,catlg,)
// ..
it always creates test.gdgbase.g0002v00 provided test.gdgbase0001v00 was the previous gdg..
so my ques. is when you give (+1) why the new version will create ?
It will not create a new version but it will create a new generation.so my ques. is when you give (+1) why the new version will create ?
We are talking (not talkin) about versions because the TS (topic starter) mentioned versions instead of generation. Of course, it could have been a trick question on behalf of the interviewer - if they said 'version' then they could be expecting the answer 'V00' thus showing that the interviewee knows the difference between 'generation' and 'version'.
Regards
Nic
Nic
FREE TUTORIALS
Tutorials
Free tutorials from mainframegurukul
- JCL Tutorial
Covers all important JCL concepts. - Cobol Tutorial
This tutorials covers all Cobol Topics from STRING to COMP-3. - DB2 Tutorial
DB2 Tutorial focuses on DB2 COBOL Programming. - SORT Tutorial
This Tutorial covers all important aspects of DFSORT with examples - CICS Tutorial
This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Interview
Mainframe Interview questions
- Cobol Interview Questions
50+ Interview Questions - JCL Interview Questions
50+ Interview Questions - DB2 Interview Questions
100+ Interview Questions - CICS Interview Questions
70+ Interview Questions - VSAM Interview Questions
27 Interview Questions
Other References
Mainframe Tools and others
- XPEDITER Reference
Explains how we can debug a program - FILEAID Reference
Explains how to browse , edit and delete datasets - Change Man Reference
Quick Start tutorial on Changeman - Abend Reference
Important Abend codes explained - FaceBook Page
MainframeGurukul FaceBook Page - LinkedIn Page
MainframeGurkul Linkedin Page