MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

GDG version (0)

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL)
View previous topic :: View next topic  
Author Message
tattva
Beginner


Joined: 02 Feb 2005
Posts: 97
Topics: 36

PostPosted: Mon May 02, 2005 6:42 pm    Post subject: GDG version (0) Reply with quote

Hi folks,

i have program which takes the (0) version of the GDG and creates (+1) version of the same GDG.

The program abends if the (0) is empty.

Now my question is :-

1) say i create a new GDG base and run this program . .shudnt this program abend !!!

2) If my above statement is TRUE. then every version of that GDG should be empty !!


Please correct me if i'm wrong !!

Thanks,
Tattva
Back to top
View user's profile Send private message
Dibakar
Advanced


Joined: 02 Dec 2002
Posts: 700
Topics: 63
Location: USA

PostPosted: Mon May 02, 2005 11:32 pm    Post subject: Reply with quote

I will guess that first version was already present when the program was run.
Back to top
View user's profile Send private message Send e-mail
s_shivaraj
Beginner


Joined: 21 Sep 2004
Posts: 140
Topics: 14
Location: Chennai, India

PostPosted: Mon May 02, 2005 11:43 pm    Post subject: Reply with quote

Tattva,
Quote:
1) say i create a new GDG base and run this program . .shudnt this program abend !!!

Yes, The program will abend because 0 version is not present.

Quote:
2) If my above statement is TRUE. then every version of that GDG should be empty !!
Creating a GDG, it doesnt mean that u r creating a file(i.e a version of a GDG ) , so you need to create a version of a GDG to use it

Hope i answered ur quesions,
_________________
Cheers
Sivaraj S

'Technical Skill is the Master of complexity, while Creativity is the Master of Simplicity'
Back to top
View user's profile Send private message AIM Address
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Tue May 03, 2005 7:49 am    Post subject: Reply with quote

Quote:

The program abends if the (0) is empty.


Tattva,

Handling of empty file should be coded in the program. The logic is pretty simple.

Code:


00000-MAINLINE.                                 
                                             
    PERFORM 10000-INITIALIZE                 
                                             
    PERFORM 20000-MAIN-PROCESS UNTIL S-INPUT-EOF = 'Y'         
                                             
    PERFORM CLOSE-FILES                     
                                             
    GOBACK                                   
    .                                       

10000-INITIALIZE.                                                   
******************************************************************
* THIS PARAGRAPH IS PERFORMED TO PROCESS THE OPENING OF FILES,   *
* INITIALIZING ALL WORKING STORAGE COUNTERS, AND PRIME READ THE  *
* INPUT FILES.                                                   *
******************************************************************
                                                                 
     PERFORM OPEN-FILES                                     
     PERFORM INITIALIZE-COUNTERS                           
     PERFORM READ-INPUT-FILE                               
     .                                                           

20000-MAIN-PROCESS.                                                 
*****************************************************************
* THIS PARAGRAPH IS THE MAIN PROCESS                            *
*****************************************************************
  YOUR MAIN PROCESS LOGIC

30000-READ-LABEL-FILE.                                             
*****************************************************************
* THIS PARAGRAPH IS PERFORMED TO READ THE INPUT FILE            *
*****************************************************************

 READ INPUT-FILE
     AT END                                     
         MOVE 'Y'      TO S-INPUT-EOF     
     NOT AT END                                 
         ADD +1        TO A-INPUT-RECS-READ
 END-READ                                       
 .



Hope this helps...

Cheers

kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL) All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group