is it possible to pass an SQL query inside a jcl which is
inside a cobol program?

Answers were Sorted based on User's Feedback



is it possible to pass an SQL query inside a jcl which is inside a cobol program?..

Answer / sk

Hey Rajesh,

this is the joke of year. :0) cheers!!!.

-SK.

Is This Answer Correct ?    3 Yes 0 No

is it possible to pass an SQL query inside a jcl which is inside a cobol program?..

Answer / amy

SQL query can be passed in the JCL but not sure of when it
is inside a cobol-program part

Is This Answer Correct ?    3 Yes 1 No

is it possible to pass an SQL query inside a jcl which is inside a cobol program?..

Answer / sowjanya

take one file in cobol and write jcl code in it.
let say file1 is the file using in cobol program
working storage section.
01 ws-rec.
05 ws-jobcard pic x(80) value '//jobname job etc'
05 ws-joblib pic x(80) value '//step1 etc'
05 ws-step pic x(80) value'//ddname dd dsn=inpfile1 etc'
05 ws-step pic x(80) value '//ddname1 dd dsn=outfile1
etc'
_
file section.
select file1 assign to intr1.
fd file1.
01 file-rec pic x(200).
procedure division.
open output file1.
write file-rec from ws-rec.

and submit this program by using ddcard -
//intr1 dd SYSPRINT=(*,INTRDR) in jcl.
and write SQl code in inpfile1 file,query result will be
displayed in oufile1.

Is This Answer Correct ?    3 Yes 1 No

is it possible to pass an SQL query inside a jcl which is inside a cobol program?..

Answer / jswan

Yes you can, as long as your project manager don't find out about your silly movements :-)

Is This Answer Correct ?    0 Yes 0 No

is it possible to pass an SQL query inside a jcl which is inside a cobol program?..

Answer / rajesh

Yes. We can move the sql statements from COBOL to JCL using
HPUNLOAD utility.

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More COBOL Interview Questions

How to get the last record in vsam file in cluster? And how can you get the ksds file records into cobol program?

0 Answers  


Hi all, I have a following requirement to write the cobol program. I have to load the 129 variables from input sequential file which are in excel sheet to the cobol inernal table. and after loading into table i have to compare this data with the business file. here compare means controlling the data whether the format(numeric,alpha) is same in the business file and in the table??? i have the same data in input and business file. could anyone please give me any idea of the logic?// i have all the 129 different variables(129rows,1 column)is there .

4 Answers   IBM, Syntel, TCS,


what is the difference between PA & PF keys?

1 Answers   IBM,


In COBOL "BEFORE" advancing is there or not ?

3 Answers  


What are the different rules for performing sort operation?

0 Answers  


Is it possible to mutliply a comp variable with an comp-3 variable. Will there be any error if i do it?

3 Answers   IBM, UST,


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

3 Answers   IBM,


What are different file OPEN modes available in COBOL?

4 Answers   Sun Life,


How you can read the file from bottom?

0 Answers  


What are the different rules of SORT operation?

0 Answers  


What are options have been removed in COBOL 11?

1 Answers  


i am a btech cs 2009 passout. i am opting for mainframe course. is it good to do this course? pls. anyone suggest me

4 Answers  


Categories