Page 1 of 2

In gdg if i wont specify version number what will happen

PostPosted: Sat Mar 06, 2010 2:20 pm
by leelaa.tsk
In gdg if i wont specify version number what will happen?
In xpeditor how will we see the values for whole record?
how it will display s9(4)V99,value is -0.01?
can we pass temporary dataset from one job to another job?
how will we retrive maximum salary for each department in flat files?

Re: In jcl

PostPosted: Sat Mar 06, 2010 3:59 pm
by Anuj Dhawan
1. I believe you are asking about generation number, but even if that I did not get your question - can you please rephrase the question?
2. You mean some group-variable?
3. -0.01.
4. Scope of temporary data-sets are limited to JCL in which it is created, so it's not possible if you're talking about temporary data-sets.
5. May be by writing a program? Do you have some data to show?

Re: In jcl

PostPosted: Sat Mar 06, 2010 7:21 pm
by Robert Sample
Terminology note: generation and version are both valid terms in referring to generation data groups, and mean extremely different things. You must use the right terminology or you'll get the wrong answer.

If you are talking about an absolute GDG reference, you cannot do so without the version -- G1234V00 is part of the data set name and leaving off the V00 creates an invalid data set reference.

If you are talking about a relative GDG reference, you don't use the version anyway -- (+0) is a generation number, not a version number.

If you meant generation number instead of version number, and you are talking about just using the GDG base name in your job, you will get all generations in the order of most recent first.

Re: In gdg if i wont specify version number what will happen

PostPosted: Mon Mar 08, 2010 10:47 am
by leelaa.tsk
yes,i am asking about generation no.If we wont specify that we wont get any abend?

Re: In jcl

PostPosted: Mon Mar 08, 2010 10:50 am
by leelaa.tsk
Anuj Dhawan wrote:1. I believe you are asking about generation number, but even if that I did not get your question - can you please rephrase the question?
2. You mean some group-variable?
3. -0.01.
4. Scope of temporary data-sets are limited to JCL in which it is created, so it's not possible if you're talking about temporary data-sets.
5. May be by writing a program? Do you have some data to show?

i want logic for writing a program.I know in sql queries for db2

Re: In jcl

PostPosted: Mon Mar 08, 2010 10:58 am
by leelaa.tsk
Anuj Dhawan wrote:1. I believe you are asking about generation number, but even if that I did not get your question - can you please rephrase the question?
yes generation number only.If we wont specify,whether we will get abend or not?
2. You mean some group-variable?
I am asking about file record
3. -0.01.
can you explain this how it will display like this?
4. Scope of temporary data-sets are limited to JCL in which it is created, so it's not possible if you're talking about temporary data-sets.
Yes.I got this answer.
5. May be by writing a program? Do you have some data to show?

Kindly give me the logic with small example.

Re: In gdg if i wont specify version number what will happen

PostPosted: Mon Mar 08, 2010 11:02 am
by dick scherrer
Hello,

i want logic for writing a program.I know in sql queries for db2
Using code, implement the same logic that is used in the sql query.

What have you done so far? People here will help you but we won't do the work for you.

Suggest you explain where you are stuck. . .

If we wont specify that we wont get any abend?
There may or may not be an abend - this may depending on the code using the data. Reading the entire gdg (specifying no specific generation) is perfectly valid.

Re: In gdg if i wont specify version number what will happen

PostPosted: Mon Mar 08, 2010 11:19 am
by leelaa.tsk
dick scherrer wrote:Hello,

i want logic for writing a program.I know in sql queries for db2
Using code, implement the same logic that is used in the sql query.

What have you done so far? People here will help you but we won't do the work for you.
once again i am asking that question.
I want to know how will we retrieve maximum salary of employee for each department in flat file. I want logic for that.pls

Suggest you explain where you are stuck. . .

If we wont specify that we wont get any abend?
There may or may not be an abend - this may depending on the code using the data. Reading the entire gdg (specifying no specific generation) is perfectly valid.

Re: In gdg if i wont specify version number what will happen

PostPosted: Fri Mar 12, 2010 12:01 am
by ITConsultant
You questions are not very clear but I will explain from what I understood.

If you only specifiy the GDG base on the input DD it would pick up all available generation. I am not sure what would happen if there is a gap in between generations though. For example:

GDG Base = HLQ.SECONDQ.EXAMPLE
GDG Generation 1 = HLQ.SECONDQ.EXAMPLE.G0001V00
GDG Generation 2 = HLQ.SECONDQ.EXAMPLE.G0002V00
GDG Generation 3 = HLQ.SECONDQ.EXAMPLE.G0003V00

If you want to concatenate all three, just have the base on the input DD.

in case someone manually deletes second generation, I am not sure if it will pick up both 1 & 3 or just 3.

Re: In gdg if i wont specify version number what will happen

PostPosted: Fri Mar 12, 2010 12:15 am
by Robert Sample
When you access the GDG base without a generation number, the catalog is used to retrieve the generations. If someone has manually deleted a generation, all the others will be retrieved as long as they are still cataloged.