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
 

 

Why shoud we use 'move low-value' before 'initialize'?

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

New User


Joined: 06 Jul 2006
Posts: 31

PostPosted: Mon Aug 14, 2006 10:30 am    Post subject: Why shoud we use 'move low-value' before 'initialize'?
Reply with quote

I saw below statements in source program
MOVE LOW-VALUE TO FIELDA.
INITIALIZE FIELDA.
Why shoud we use 'move low-value' before 'initialize'?why not use 'initialize' directly?
Back to top
View user's profile Send private message

DavidatK

Active Member


Joined: 22 Nov 2005
Posts: 700
Location: Troy, Michigan USA

PostPosted: Mon Aug 14, 2006 8:20 pm    Post subject: Re: Why shoud we use 'move low-value' before 'initialize'?
Reply with quote

There is no reason to use 'MOVE LOW-VALUES'. It's overlayed by 'INITIALIZE'

Dave
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Tue Aug 15, 2006 5:04 am    Post subject:
Reply with quote

Hi,

If the field has FILLERs and low vals are desired in those parts of the field, then that's the way to do it.
Back to top
View user's profile Send private message
william51
Warnings : 1

New User


Joined: 06 Jul 2006
Posts: 31

PostPosted: Tue Aug 15, 2006 8:45 am    Post subject:
Reply with quote

mmwife,
Do you mean that the INITIALIZE statement can't give the FILLERS default value?
Back to top
View user's profile Send private message
DavidatK

Active Member


Joined: 22 Nov 2005
Posts: 700
Location: Troy, Michigan USA

PostPosted: Tue Aug 15, 2006 7:45 pm    Post subject: Re: Why shoud we use 'move low-value' before 'initialize'?
Reply with quote

Jack is absolutely correct, filler fields are unaffected by ?INITIALIZE?

Dave
Back to top
View user's profile Send private message
cobolunni

Active User


Joined: 07 Aug 2006
Posts: 128
Location: kerala,india

PostPosted: Sat Aug 19, 2006 5:47 pm    Post subject: Re: Why shoud we use 'move low-value' before 'initialize'?
Reply with quote

so what is the reason to add initialize after moving low value .The first statment itself can do the initialization so what is the need of second
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Sat Aug 19, 2006 9:09 pm    Post subject:
Reply with quote

A low-vals MOVE fills the entire field w/binary zeros. The INIT will overlay the low-vals with appropriately formatted values for named non-FILLER sub fields. Eg. COMP-3, PIC X, PIC 9 DISPLAY, etc.
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. How to move a long alphanumeric data ... lind sh COBOL Programming 8 Mon Dec 05, 2016 7:51 pm
No new posts Protection Exception while move 0 to ... Kevin Vaz CICS 10 Tue Oct 18, 2016 4:19 pm
This topic is locked: you cannot edit posts or make replies. Alphanumeric to Numeric move on UNIX mistah kurtz COBOL Programming 16 Wed Jul 27, 2016 8:47 pm
No new posts Need information on COBOL MOVE CORRES... subratarec COBOL Programming 10 Tue Jun 28, 2016 10:38 pm
No new posts how to move view the remote file in o... mailtoashok CICS 2 Fri Feb 12, 2016 1:07 pm


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