Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Perform 1000-Initialize thru 1000-Initialize

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
sajjan jindal
Warnings : 1

New User


Joined: 09 Sep 2007
Posts: 60
Location: india

PostPosted: Wed Jul 15, 2009 9:05 pm    Post subject: Perform 1000-Initialize thru 1000-Initialize
Reply with quote

Hi,

What will happen if we perform the following Para:

Perform 1000-Initialize thru 1000-Initialize.

Regards,
Sajjan.
Back to top
View user's profile Send private message

enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10256
Location: italy

PostPosted: Wed Jul 15, 2009 9:08 pm    Post subject: Reply to: Dount on Perform
Reply with quote

why don' t You try and let us know ??
Back to top
View user's profile Send private message
vinilan

New User


Joined: 24 Jul 2008
Posts: 1
Location: chennai

PostPosted: Wed Jul 15, 2009 9:17 pm    Post subject: Reply to: Dount on Perform
Reply with quote

I think it is syntatically incorrect as both the initiation para and end para are same in this case for PERFORM statement

vinilan vetha
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8057
Location: East Dubuque, Illinois, USA

PostPosted: Wed Jul 15, 2009 10:43 pm    Post subject:
Reply with quote

Actually, COBOL 3.4 accepts it without error:
Code:
   000013                PROCEDURE DIVISION.
   000014                    MOVE LV-BYTE                TO  WS-VALUE-BYTE.
   000015                    DISPLAY WS-COMP-FIELD.
   000016                    PERFORM 1000-INITIALIZE THROUGH 1000-INITIALIZE.
   000017                    STOP RUN.
   000018
   000019                1000-INITIALIZE.
   000020                    MOVE X'05'                  TO  LV-BYTE.
1PP 5655-G53 IBM Enterprise COBOL for z/OS  3.4.1               MF0087    Date 0
Back to top
View user's profile Send private message
guptae

Moderator


Joined: 14 Oct 2005
Posts: 1187
Location: Bangalore,India

PostPosted: Wed Jul 15, 2009 11:10 pm    Post subject:
Reply with quote

Hello ,

I believe it will execute move x'05' to LV-BYTE.
Back to top
View user's profile Send private message
Debabrata Pruseth

New User


Joined: 11 Dec 2008
Posts: 59
Location: Pune , India

PostPosted: Thu Jul 16, 2009 12:06 am    Post subject:
Reply with quote

It will PERFORM the 1000-INITIALIZE paragraph once . It is a good interview question that i had once come across.
Back to top
View user's profile Send private message
Bharath Bhat

Active User


Joined: 20 Mar 2008
Posts: 283
Location: chennai

PostPosted: Thu Jul 16, 2009 12:46 pm    Post subject:
Reply with quote

It indeed performed 1000-para only once.
Code:
 0000-PARA.                             
     PERFORM 1000-PARA THRU 1000-PARA. 
     STOP RUN. 
 1000-PARA.                             
      DISPLAY '1000-'.                 
                       


result
Code:
********************************* TOP OF DATA **********************************
1000-                                                                           
******************************** BOTTOM OF DATA ********************************
Back to top
View user's profile Send private message
sajjan jindal
Warnings : 1

New User


Joined: 09 Sep 2007
Posts: 60
Location: india

PostPosted: Fri Jul 17, 2009 8:48 pm    Post subject:
Reply with quote

Thank You friends, even i tried and found the same results.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts after TBSARG: Row 370 from 1000 Pedro TSO/ISPF 1 Fri Apr 14, 2017 2:32 am
No new posts How to perform Digest Access Authenti... vasanthz All Other Mainframe Topics 0 Tue Mar 15, 2016 4:47 pm
No new posts VSAM file to be used by more than 100... i.jagath JCL & VSAM 11 Thu Aug 20, 2015 10:36 pm
No new posts Need to Initialize an empty flat file... ksouren007 DFSORT/ICETOOL 9 Fri Sep 27, 2013 6:57 pm
No new posts How to initialize address location in... Pavankumar.m COBOL Programming 2 Thu Sep 05, 2013 12:58 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us