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 an in line perform? When would you use it? Anything else you wish to say about it.
what is search and searchall?what is the diffrence between them?give an best example?
What is a SSRANGE and NOSSRANGE?
IF I mention stop run in CICS what happens?
What is amode(24), amode(31), rmode(24) and rmode(any) (applicable to only mvsesa enterprise server) ?
Can we redefine the field of x(200) to less than 200?
What kind of error is trapped by on size error option?
Explain how you can characterize tables in cobol?
How to use the same COBOL program in Batch and CICS on lines? explain with an example
if we have " ibm mainframe ",in that how to remove first and last leading space eg:"ibm mainframe" like that the answer we need
Differentiate between structured cobol programming and object-oriented cobol programming.
Name the sections present in data division.
How to remove the spaces at the end of each record in the output file of variable length, via cobol program?
Difference between cobol and cobol-ii?
What is amode(24)?