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
 

 

What does INITIALIZE clause do

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe Interview Questions
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    Post subject: What does INITIALIZE clause do
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> Mainframe Interview Questions All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Need help on SQL Dynamic WHERE Clause subratarec DB2 12 Sat Jul 16, 2016 3:11 pm
No new posts [SQL0029] INTO clause missing from em... HABBIE DB2 2 Fri Sep 04, 2015 3:54 pm
No new posts 3-D Table with nested DEPENDING ON Cl... VivekKhanna COBOL Programming 5 Sat Aug 08, 2015 11:18 pm
No new posts when=group clause: question about the... tuxama DFSORT/ICETOOL 2 Thu Mar 26, 2015 12:51 pm
No new posts pic clause on group variable error CuriousMainframer COBOL Programming 6 Mon Jul 14, 2014 6:33 pm


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