ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
tip   SiteMap shows list of All Categories in this site.
Google
 
Categories  >>  Software  >>  MainFrame  >>  IBM MainFrame  >>  COBOL
 
 


 

 
 COBOL interview questions  COBOL Interview Questions
 JCL interview questions  JCL Interview Questions
 CICS interview questions  CICS Interview Questions
 DB2 interview questions  DB2 Interview Questions
 IMS interview questions  IMS Interview Questions
 IDMS interview questions  IDMS Interview Questions
 Natural interview questions  Natural Interview Questions
 ADABAS interview questions  ADABAS Interview Questions
 REXX interview questions  REXX Interview Questions
 Assembler interview questions  Assembler Interview Questions
 CLIST interview questions  CLIST Interview Questions
 QMF interview questions  QMF Interview Questions
 MVS interview questions  MVS Interview Questions
 OS390 interview questions  OS390 Interview Questions
 OS 2 interview questions  OS 2 Interview Questions
 VSAM interview questions  VSAM Interview Questions
 QSAM interview questions  QSAM Interview Questions
 Sysplex interview questions  Sysplex Interview Questions
 IBM MainFrame AllOther interview questions  IBM MainFrame AllOther Interview Questions
Question
I have a source program compiled with Cobol-2. The output 
file has a record length of 100 defined in the program but 
a record of 60 bytes getting written into it. i.e. The rest 
of 40 bytes I am not Writing anything. But it by default 
puts some values into the last 40 bytes. However it does 
not impact anything. But when Compiled the module with 
Enterprise Cobol the last 40 bytes were spaces as fillers. 
Can anyone explain?
 Question Submitted By :: Bishnu
I also faced this Question!!     Rank Answer Posted By  
 
  Re: I have a source program compiled with Cobol-2. The output file has a record length of 100 defined in the program but a record of 60 bytes getting written into it. i.e. The rest of 40 bytes I am not Writing anything. But it by default puts some values into the last 40 bytes. However it does not impact anything. But when Compiled the module with Enterprise Cobol the last 40 bytes were spaces as fillers. Can anyone explain?
Answer
# 1
it may be filled with null values. Junk charecters.
Due to before writing data it has to initialize.

That is the reason it is showing junk charecters.
 
Is This Answer Correct ?    1 Yes 0 No
Ramanujam
 
  Re: I have a source program compiled with Cobol-2. The output file has a record length of 100 defined in the program but a record of 60 bytes getting written into it. i.e. The rest of 40 bytes I am not Writing anything. But it by default puts some values into the last 40 bytes. However it does not impact anything. But when Compiled the module with Enterprise Cobol the last 40 bytes were spaces as fillers. Can anyone explain?
Answer
# 2
IN THE CASE OF FB , IT WILL FILL SPACE I.E, FILLER, BUT IN 
VARAIBLE MODE YOU CAN'T SEE SPACE OR FILLER.
 
Is This Answer Correct ?    1 Yes 0 No
Prashanth
 
 
 
  Re: I have a source program compiled with Cobol-2. The output file has a record length of 100 defined in the program but a record of 60 bytes getting written into it. i.e. The rest of 40 bytes I am not Writing anything. But it by default puts some values into the last 40 bytes. However it does not impact anything. But when Compiled the module with Enterprise Cobol the last 40 bytes were spaces as fillers. Can anyone explain?
Answer
# 3
hi 

Before writing into the output file, just explicitly give 
move spaces to rest of fields..
eg: ww-filler  pic x(40) value spaces.
    move  ww-filler    to ww-out-rec(61:40)
    write ww-out-rec.

i hope the above code will resovle your problem.

Happy coding,
Ram.G
 
Is This Answer Correct ?    0 Yes 0 No
Ram.g
 
  Re: I have a source program compiled with Cobol-2. The output file has a record length of 100 defined in the program but a record of 60 bytes getting written into it. i.e. The rest of 40 bytes I am not Writing anything. But it by default puts some values into the last 40 bytes. However it does not impact anything. But when Compiled the module with Enterprise Cobol the last 40 bytes were spaces as fillers. Can anyone explain?
Answer
# 4
I think you ppl are hitting on wrong direction for 
answering this question. The question doesn't seem to be 
asking how to resolve a junk character, instead it's asking 
about the different behaviour of the same program in two 
different versions of Cobol - COBOLII and Enterprise COBOL. 
One is placing junk characters in the last 40 bytes and the 
other one intialized it to spaces. Any possible answer from 
anyone now...?
 
Is This Answer Correct ?    0 Yes 0 No
Vish
 

 
 
 
Other COBOL Interview Questions
 
  Question Asked @ Answers
 
What are some examples of command terminators?  1
Program A calls program B. Will the working storage variables declared in program B be initialized every time it is called by program A or will the values be retained until the end of program A?  7
What is 88 level used for ?  2
What is CALL statement in COBOL?  1
i Want All cobol ERROR codes? HCL1
What is wrong with the following data declaration? 01 W-DATE PIC X(6). 05 DD PIC 99. 05 MM PIC 99. 05 YY PIC 99. (a) Nothing is wrong. (b) Under W-DATE all level 05 items are having a PIC 99 but level 01 has PIC X(6). (c) PIC can't be specified for a group item. (d) DD, MM, and YY are invalid datanames. TCS4
How is sign stored in a comp-3 field?  4
how to transfer the file from pc to mainframe??  3
Can the OCCURS clause be at the 01 level?  1
Read filea And file b write the same records in both files? Records in a but not in b record in b but not in a TCS2
Explain complete concept of table handling in COBOL with an example? IBM2
What will happen if a variable is declared as below.. Explain with an example? Working storage section:- 01 WS-VARX PIC X(9) VALUE SPACES. 01 WS-VARN REDEFINES WS-VARX PIC 9(9).  7
Wat is the difference between NEXT and CONTINUE statement in cobol,can any one explain with example.  6
What is the difference between NEXT SENTENCE and CONTINUE?  1
What does the INITIALIZE verb do?  1
Move Zeroes to I move 5 to j perform para1 varying I from 10 by -2 until I = 0 display j. para1. Add 5 to j. What’ll be the value after execution of display stmt. A) 35 B) 40 C) 30 D) 25 please explain how?  3
What is the different between index and subscript?  3
What is the significance of 'above the line' and 'below the line'?  1
Hi All, how is sign is stored in S9(17) comp-3 variable. Answer with an Example will be of great help. EDS5
How does IDMS communicate with CICS? Satyam1
 
For more COBOL Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com