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

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between a binary search and a sequential search what are the pertinent cobol?

925


how we sort two input files based on a common column and giving one o/p file please send me the coding logic?

1881


Write the code implementing the perform … varying.

820


Mention the guidelines to write a structured cobol program?

822


How to remove 2 duplicate records and copy only one using job control language?

966


How do you reference the fixed block file formats from cobol programs

911


What is the Purpose of Pointer in the string?

827


Difference between cobol and cobol-ii?

941


how do you reference the printer file formats from cobol programs

894


What is the use of intialize verb?

968


How do you code cobol to access a parameter that has been defined in jcl? And do you code the parm parameter on the exec line in jcl?

936


How can i load all the data from a file to Table (array) in cobol.How i manage the occurs clause with out reading the file.Any options avilable ? Please can any one help me it is urgent?

2338


I need to compare 3 variables(dates) and do some processing based on the earliest date. There could be more then 1 date record in any of the 3 fields. What is the best way to code this?

2006


Whats the difference between search & search ALL?

5867


What is cobol?

946