IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

What does INITIALIZE clause do


IBM Mainframe Forums -> Mainframe Interview Questions
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
tarakanta
Warnings : 1

New User


Joined: 30 Jan 2007
Posts: 10
Location: Hyderabad

PostPosted: Sun Feb 18, 2007 9:34 pm
Reply with quote

HI ALL

I WAS ASKED LIKE THIS

W-S SECTION.
01 GRP01.
02 VAR1 PIC XX VALUE 'AB'.
02 VAR2 PIC 99 VALUE 45.
02 FILLER PIC XX VALUE 'AB'
.............
...........
PROCEDURE DIVISION.
..................
...............
INITIALIZE GRP01.
DISPLAY GRP01.
..................
....................

WHAT WILL BE THE OUTPUT?????????????

Warning: ??????????? removed from Title
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Sun Feb 18, 2007 9:45 pm
Reply with quote

Hi,

If you used: DISPLAY '>' GRP01 '<'.

You get: >bb00AB< where b is a blank.

The default for INIT... is to put spaces in A/N fields and zeros in num fields. The zeros will have a format consistant w/its type - e.g. COMP, COMP-3, etc. Fillers are left alone.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> Mainframe Interview Questions

 


Similar Topics
Topic Forum Replies
No new posts To search DB2 table based on Conditio... DB2 1
No new posts NOT IN clause in COBOL pgm COBOL Programming 8
No new posts SUSBSCRIPT WITH SIGN IN PIC CLAUSE COBOL Programming 3
No new posts usage of CASE in WHERE clause DB2 10
No new posts Cobol redefines for Signed pictured c... COBOL Programming 4
Search our Forums:

Back to Top