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
 

 

INTIALIZE keyword in cobol

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

Active User


Joined: 22 May 2009
Posts: 160
Location: Bangalore

PostPosted: Mon May 24, 2010 12:17 pm    Post subject: INTIALIZE keyword in cobol
Reply with quote

Hi all,
Need a clarification on the INITIALIZE keyword.

As known when we use this keyword with any of the copybooks like

01 RECORD1-LAYOUT.
COPY RECORD1.

then it would initialize all the numeric and alphanumeric values appropriately to zeroes or spaces but i face a strange scenario whrer the upper section like say if RECORD1 has two 05 levels under a 02 level
Code:


02 RECORD1
   05 INPUT-1
        10 VAR1    PIC X(01)
         .
         .
         .
   05 OUTPUT-1
         10 VAR3    PIC 9(04)
           .
           .
           .

only the INPUT-1 is getting initialized but the OUTPUT-1 is left without initialization, can i get any help as where im doing a mistake in this regards.
Back to top
View user's profile Send private message

dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Mon May 24, 2010 12:20 pm    Post subject:
Reply with quote

Hello,

Might the code be "INITIALIZE INPUT-1"?

Why do you want to initialize the input record area?
Back to top
View user's profile Send private message
tecnokrat
Warnings : 1

Active User


Joined: 22 May 2009
Posts: 160
Location: Bangalore

PostPosted: Mon May 24, 2010 12:33 pm    Post subject:
Reply with quote

No i have INITIALIZED the whole RECORD-1 the code has the same and verified also.
Back to top
View user's profile Send private message
tecnokrat
Warnings : 1

Active User


Joined: 22 May 2009
Posts: 160
Location: Bangalore

PostPosted: Mon May 24, 2010 2:35 pm    Post subject:
Reply with quote

Found the problem,

As the copybook has been changed and the copybook was not reflecting the same changes hence the problem occuring.

MORAL: pls take a new copy or the compile the program in that particular region to get the exact changes.
Back to top
View user's profile Send private message
Phrzby Phil

Active Member


Joined: 31 Oct 2006
Posts: 962
Location: Richmond, Virginia

PostPosted: Mon May 24, 2010 5:17 pm    Post subject:
Reply with quote

Good job replying with not just the problem/solution, but also the lesson learned.
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
This topic is locked: you cannot edit posts or make replies. Cobol GUI (like Editor) Kala Mainframe COBOL Programming 14 Wed May 10, 2017 12:30 pm
No new posts IMS T-Pipe queue counts in a COBOL Pr... Siva NKK Kothamasu IMS DB/DC 0 Tue May 09, 2017 6:31 pm
No new posts COBOL Code Parsers and Lineage Establ... balimanja COBOL Programming 2 Tue May 02, 2017 3:30 am
No new posts Cobol upgrade - source code missing f... gthmrj IBM Tools 1 Wed Apr 26, 2017 6:04 pm
No new posts COBOL Programming Sandpit? jodrisco COBOL Programming 6 Wed Apr 12, 2017 3:47 am


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