suresh


{ City } trichy
< Country > india
* Profession * nil
User No # 2339
Total Questions Posted # 0
Total Answers Posted # 23

Total Answers Posted for My Questions # 0
Total Views for My Questions # 0

Users Marked my Answers as Correct # 174
Users Marked my Answers as Wrong # 24
Questions / { suresh }
Questions Answers Category Views Company eMail




Answers / { suresh }

Question { 6631 }

Please let me know how the Eject verb works for page break..
I want to know the code, how it is used.


Answer

We have to write 'EJECT' in 7th column, otherwise it will
give error.

Is This Answer Correct ?    0 Yes 2 No

Question { Xansa, 14975 }

Should I use STOP RUN in the sub program??why?


Answer

If we use STOP RUN in the sub program, in sub program
itself will terminate the execution and the control will
not come back to the calling program or main program.

Instead we can use "EXIT PROGRAM". This command will pass
the control to main program.

Is This Answer Correct ?    3 Yes 0 No


Question { IBM, 9448 }

We have 3 programms A,B,C.In the middle of the program A
the controls goes to program B and in the middle of the
program B control wants to go program C,after completion of
program C again control comes to program B and again after
completion of program B control comes to program A.How the
process will takes and what are the controls we use for
that process.If it is possible anybody of you explain with
example?


Answer

if it is a fully cobol program we can use the following
statement to pass the control to another program, which
will return the control to the next line of calling program.

A -> B -> C
In program A: call 'B'.
In program B: call 'C'.
EXIT PROGRAM.(instead of STOP RUN)
In program C: EXIT PROGRAM.(instead of STOP RUN).

if it is CICS program, we have to user LINK for getting the
control back to the calling program.

Is This Answer Correct ?    2 Yes 1 No

Question { HCL, 17435 }

how to submit a jcl by cobol program.
clear me with an example.


Answer

Let us the program is PGM1. Below is the JCL for running
the PGM1.

//STEP1 EXEC PGM=PGM1
//INSUB DD SYSOUT (* INTRDR)

In the program define INSUB as file (should have a LRECL of
80). Write all the JCL codings into INSUB file.

When you close the INSUB file, the job will be submitted to
JES automatically.

Is This Answer Correct ?    0 Yes 2 No

Question { TCS, 14237 }

how to transfer the file from pc to mainframe??


Answer

We can use Option 6 in mainframe to transfer a file from
mainframe to PC or PC to mainframe. More over,we can use
FTP via command prompt in PC to trasfer a file to and from
Mainframe.

Is This Answer Correct ?    4 Yes 0 No

Question { 5976 }

Suppose a program has the following code. What will be the
output?

MAIN-PARA.
DISPLAY 'MAIN-PARA'
PERFORM SECTION-A.
STOP RUN.

SECTION-A.
PARA-A1.
DISPLAY 'SECTION A PARA A1'.
PARA-A2.
DISPLAY 'SECTION A PARA A2'.


Answer

The output is :
---------------
MAIN-PARA
SECTION A PARA A1
SECTION A PARA A2

Because, There is no THRU command in PERFORM statement. So
it will execute still it reaches the 'EXIT' command or it
will perform the full section or until the next section
reaches.

Is This Answer Correct ?    0 Yes 1 No

Question { Wipro, 11932 }

When the working storage variables get allocated?
a.At Compile time
b.At starting of the run time
c.At end of the run time.
d.None of these


Answer

Working storage variables will get allocated when the
program is start running.

so answer would be B. At starting of the run time.

Is This Answer Correct ?    1 Yes 1 No

Question { IBM, 10472 }

Can we access the a[0] in the array ?


Answer

It will give compilation time error, as the compiler knows
the value of subscript when compile the program.
ex: A[0]

if you are accessing the same by subscript variable, then
it will give run time error.
ex: A[ws-cnt]

Is This Answer Correct ?    3 Yes 0 No

Question { IBM, 9783 }

In A cobol program , we can use COPY Statement in FILE-
SECTION / WORKING-STORAGE SECTION / ENVIRONMENT DIVIION
basically what is the difference


Answer

There is no difference.

COPY statement just copy all the lines from the copybook
into the source code.

When we feel some piece of codes are used repeatly then we
can code it into the copylib.

So, it is in our hand where to use COPY.

Is This Answer Correct ?    3 Yes 0 No

Question { IBM, 28286 }

Bind concepts in DB2 cobol


Answer

The first thing is Host languages.
Whatever we are using in cobol (other than cobol langauge
command) that are called HOST language.

DB2 is also one of the host language.
COBOL compiler does not know the host language and does not
compile the same.
we will take cobol-db2 program..
Here, we are introduce PRE-COMPILER....
Pre-compiler will spilt the cobol db2 program into two
module.
1. Cobol program (fully cobol,all the host language
commands will get replaced with "MOVE and CALL" statements.
2. DBRM (DataBast Request Module)- only those commands,
which are code within 'EXEC SQL .. END-EXEC.

Now, we have spited and we have separate for each..(COBOL
and DB2)..
We know about compilation process for COBOL.
Now come to BIND process....
Bind is nothing but, compilation process of DBRM.
The output of this compilation process(BIND) is Package.
If we bind the packages then we will get Plan/Application
plan.
When we do the link-edit the cobol program, a thread will
be created between the load module of cobol and plan.

Is This Answer Correct ?    76 Yes 8 No

Question { IBM, 28286 }

Bind concepts in DB2 cobol


Answer

As Sharath requested...

As we all know, all our programming(high level language) needs to be converted(compiled) into system-understandable(low level language) to be executed.
So, SQL statements in the COBOL programs needs to be compiled, such process is called BIND. DB2 Bind compiles all your sql statements(dbrm) into an executable format.
BIND also verifies all the information in the program with DB2 databases..
Here are the list of items happening through out BIND process (as of I know :) )
1. Syntax check of SQL query
2. Availability of Tables & columns in the database
3. It uses DB2 Optimizer to create the better access path. A clear way to read/update/delete table. like.. what are the columns are reading, which indexes needs to be used, the table space..etc.

So after BIND process finished, the Package/Plan contains exactly how to do, what we meant to do in system understandable language.

Hope it helps.. My apologies, if I confused or missed something.

Is This Answer Correct ?    10 Yes 0 No

Question { 7520 }

How can we know that cobol program is using report file or
simple file....?


Answer

If the program uses the simple file then the statement used
to write into that is "WRITE REC-NAME".

If the program uses the report file then the statement used
to write into that is "GENERATE REC-NAME".

Is This Answer Correct ?    0 Yes 2 No

Question { IBM, 14925 }

How To move a value to an array using move verb?


Answer

one correction in Jagan's answer..

MOVE 1 to A(I)

we should not use [] for array in cobol.

Is This Answer Correct ?    12 Yes 0 No

Question { iGate, 34792 }

I have a JCL with 10 steps, want to execute first 5 steps
only, what are ways of doing it?is it possible to control
through JOB card?


Answer

You can create a NULL (//) point after the 5 step. so the
job will stop after step 5 is executed.

I don't think we can do it via JOB CARD. Please let me know
if anyone knows.

Is This Answer Correct ?    14 Yes 1 No

Question { 13069 }

Difference between ps, esds


Answer

Vs Kumar is correct. But he forget to mention one thing.

PS files is accessed normally whereas ESDS is access through
the VSAM (Virtual Storage Access Method). VSAM is not a file,
It just a method or process that How to access the file.

Actually, PS and ESDS are same in the functionality wise.
But it is different as the access method used. ESDS will be fast access-able.

Please correct me, if I'm wrong.

Is This Answer Correct ?    2 Yes 1 No

 [1]   2    Next