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
System Testing for Mainframe Developers What is System Testing? integration testing ? what's the procedure ..
Write down the divisions of cobol program?
) How do u handle errors in BMS macro?
please..could u give an example about USAGE IS POINTER ..and explain why and when we use it ?
Which division and paragraphs are mandatory for a COBOL program?
how do you reference the printer file formats from cobol programs
)If there are 10 steps in GDG, if I want to refer the step2 after step5 . what should I do?
What kind of error is trapped by on size error option?
what happens if parmparameter passes zero bytes to the program
How many bytes S(8) comp field occupy and its maximum value?
What are literals?
INREC AND OUTREC? HOW TO SPLIT 5K RECORDS TO DIFFERENT FILES IN A FILE IN COBOL? RESTART IN COBOL-DB2? ISOLATION LEVELS?
What are the rules of the move verb?
how do you reference the esds vsam file formats from cobol programs
What are the different data types in cobol?