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 ..
)If there are 10 steps in GDG, if I want to refer the step2 after step5 . what should I do?
What is the usage of comp fields in cobol?
What are the different types of condition in cobol and write their forms.
What is a report item?
What are different data types in cobol?
Which division and paragraphs are mandatory for a COBOL program?
Explain what you understand by passing by value.
how do you reference the printer file formats from cobol programs
What rules are followed by the search verb.
Name some of the examples of COBOl 11?
I have one ps file in which there are 3 fileds emp_no,emp_name and leave_app.this ps file information give the detail of employee which is going to apply for leave.suppose emp_no=113430,emp_name=ajay,leave_app=1 that means he is going to apply for 1 day leave.and accordingling the table in db2 will be updated means if he has that no of leave in his account then he will get dat leave and updated acc. in table(leave_balance=previous leave present in table-leave_app).Now i want to check whther the updated result is correct or not by comparing the two ps file using IEBCOMPARE or icetool so what is going to be the two ps file and how its is going to be compare.
how to move the records from file to array table. give with code example
What is redefines clause in COBOL?
Why is it necessary that file needs to be opened in I-O mode for REWRITE?