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: 964
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
No new posts XML Parse for COBOL 5.2 Bhanu Praveen COBOL Programming 1 Sat Jul 08, 2017 8:58 pm
No new posts Dynamic output file creation in cobol... smileheal COBOL Programming 7 Thu Jun 15, 2017 10:53 pm
No new posts Search utility(3.14) using JCl and Cobol RKS3 COBOL Programming 12 Sat Jun 10, 2017 10:24 pm
No new posts COBOL DB2 program - zIIP eligible vasanthz COBOL Programming 7 Wed May 31, 2017 5:12 am
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


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