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
What is the difference between a binary search and a sequential search what are the pertinent cobol?
how we sort two input files based on a common column and giving one o/p file please send me the coding logic?
Write the code implementing the perform … varying.
Mention the guidelines to write a structured cobol program?
How to remove 2 duplicate records and copy only one using job control language?
How do you reference the fixed block file formats from cobol programs
What is the Purpose of Pointer in the string?
Difference between cobol and cobol-ii?
how do you reference the printer file formats from cobol programs
What is the use of intialize verb?
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?
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?
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?
Whats the difference between search & search ALL?
What is cobol?