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
 
Initialization

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe Interview Questions
View previous topic :: :: View next topic  
Author Message
Shriram Jogdand

New User


Joined: 14 Oct 2008
Posts: 65
Location: Pune

PostPosted: Thu Dec 10, 2009 4:48 pm    Post subject: Initialization
Reply with quote

Hi,

I have variables declared as below

01 WS-VAR.
05 WS-A PIC x(10).
05 WS-B PIC x(7) value 'SHRIRAM'.

My questions are
1. What will happen if i will initialize WS-VAR?
2. If it will move spaces in both the variable WS-A and WS-B, then what should we do to retain the values of WS-B after INITIALIZATION?
Back to top
View user's profile Send private message

expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Thu Dec 10, 2009 5:00 pm    Post subject:
Reply with quote

The idea of the interview questions forum is that you give your answers and the forum members will tell you if you are correct or not, and then help you understand the correct answer if needed.
Back to top
View user's profile Send private message
Shriram Jogdand

New User


Joined: 14 Oct 2008
Posts: 65
Location: Pune

PostPosted: Thu Dec 10, 2009 5:02 pm    Post subject: Reply to: Initialization
Reply with quote

My Answers were
1. If we will Initaialize then both the variable will have spaces.
2. I was not able to give answer of second one.
Back to top
View user's profile Send private message
Srihari Gonugunta

Active User


Joined: 14 Sep 2007
Posts: 295
Location: Singapore

PostPosted: Thu Dec 10, 2009 5:25 pm    Post subject:
Reply with quote

I suppose changing WS-B to FILLER would do.
Back to top
View user's profile Send private message
Dsingh29

Active User


Joined: 16 Dec 2008
Posts: 132
Location: IBM

PostPosted: Thu Dec 10, 2009 5:29 pm    Post subject:
Reply with quote

Hi,


Srihari's answer is correct and the other option is not to give the variable name.


see this link for more info...

http://www.3000newswire.com/subscribers/InCobol-9905.html
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: Thu Dec 10, 2009 9:01 pm    Post subject:
Reply with quote

Hello,

If only WS-A was initialized, WS-B would remain unchanged.

And the WS-B name would still be usable. . .

A rather poor question, imho.
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 % free space issue of the Storage Gro... Pete Wilson JCL & VSAM 6 Fri Feb 15, 2013 6:34 pm
No new posts CICS logoff and commare initialization anjoos20 CICS 1 Fri Aug 05, 2011 11:30 am
No new posts Initialization prashanth1 IMS DB/DC 3 Thu Jul 28, 2011 9:44 pm
No new posts Variable initialization error Vidya Bhama COBOL Programming 8 Mon Feb 21, 2011 5:58 pm
No new posts Initialization of DS and DC variable ... k_rajesh PL/I & Assembler 7 Mon May 24, 2010 6:43 pm

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