Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 965
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 IEW2456E error when link-editing a C ... Senthilraj JCL & VSAM 0 Fri Oct 13, 2017 3:12 pm
No new posts Assembler Macro Copybook converted to... Ziquilix PL/I & Assembler 4 Tue Sep 26, 2017 3:07 am
This topic is locked: you cannot edit posts or make replies. Extract all "IF" Statements... Adarsh Damodaran CLIST & REXX 1 Wed Sep 06, 2017 9:28 am
No new posts ALPHABETIC check in COBOL vidyaa COBOL Programming 8 Thu Aug 17, 2017 7:13 pm
No new posts XML Parse for COBOL 5.2 Bhanu Praveen COBOL Programming 1 Sat Jul 08, 2017 8:58 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us