In gdg if i wont specify version number what will happen



Support for OS/VS COBOL, VS COBOL II, COBOL for OS/390 & VM and Enterprise COBOL for z/OS

In gdg if i wont specify version number what will happen

Postby leelaa.tsk » Sat Mar 06, 2010 2:20 pm

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?
leelaa.tsk
 
Posts: 13
Joined: Wed Mar 03, 2010 7:48 pm
Has thanked: 0 time
Been thanked: 0 time

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

 

Re: In jcl

Postby Anuj Dhawan » Sat Mar 06, 2010 3:59 pm

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?
Anuj
Anuj Dhawan
 
Posts: 274
Joined: Mon Feb 25, 2008 3:53 am
Location: Mumbai, India
Has thanked: 6 times
Been thanked: 4 times

Re: In jcl

Postby Robert Sample » Sat Mar 06, 2010 7:21 pm

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.
Robert Sample
Global moderator
 
Posts: 3367
Joined: Sat Dec 19, 2009 8:32 pm
Location: East Dubuque, Illinois
Has thanked: 1 time
Been thanked: 222 times

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

Postby leelaa.tsk » Mon Mar 08, 2010 10:47 am

yes,i am asking about generation no.If we wont specify that we wont get any abend?
leelaa.tsk
 
Posts: 13
Joined: Wed Mar 03, 2010 7:48 pm
Has thanked: 0 time
Been thanked: 0 time

Re: In jcl

Postby leelaa.tsk » Mon Mar 08, 2010 10:50 am

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
leelaa.tsk
 
Posts: 13
Joined: Wed Mar 03, 2010 7:48 pm
Has thanked: 0 time
Been thanked: 0 time

Re: In jcl

Postby leelaa.tsk » Mon Mar 08, 2010 10:58 am

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.
leelaa.tsk
 
Posts: 13
Joined: Wed Mar 03, 2010 7:48 pm
Has thanked: 0 time
Been thanked: 0 time

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

Postby dick scherrer » Mon Mar 08, 2010 11:02 am

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.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6304
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 91 times

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

Postby leelaa.tsk » Mon Mar 08, 2010 11:19 am

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.
leelaa.tsk
 
Posts: 13
Joined: Wed Mar 03, 2010 7:48 pm
Has thanked: 0 time
Been thanked: 0 time

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

Postby ITConsultant » Fri Mar 12, 2010 12:01 am

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.
ITConsultant
 
Posts: 15
Joined: Wed Mar 10, 2010 4:28 am
Has thanked: 0 time
Been thanked: 0 time

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

Postby Robert Sample » Fri Mar 12, 2010 12:15 am

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.
Robert Sample
Global moderator
 
Posts: 3367
Joined: Sat Dec 19, 2009 8:32 pm
Location: East Dubuque, Illinois
Has thanked: 1 time
Been thanked: 222 times

Next

Return to IBM Cobol

 


  • Related topics
    Replies
    Views
    Last post