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 static and dynamic call in cobol?
What the difference is between continue and next sentence?
What is a scope terminator give example?
What is the compute verb? How is it used?
Name the divisions, which are available in a cobol program?
How do we get current date from system with century in COBOL?
What is the Purpose of POINTER Phrase in STRING command in COBOL?
What is report-item in COBOL?
How to use the same COBOL program in Batch and CICS on lines? explain with an example
How you can characterize tables in cobol?
Our issue is there seems to be a disconnect, or no link, between our SELECT statement and our SD. We had SELECT SORT-FILE and SELECT SORT-FILE ASSIGN TO SORTWRK. ASSIGN TO SORTWRK1 SORTWRK2 SORTWRK3 SORTWRK4. with SD SORT_FILE RECORD CONTAINS 7833 CHARACTERS. In either case, at run time, the system ignored our SORTWRK# DD statements and allocated 16 sort works with the SORTWK## naming convention. Any ideas why the system does not recognize the connection? We do not even need the SORTWRK DD statements. Thanks
What is the difference between PIC 9.99 and PIC9v99?
How to get the last record in vsam file in cluster? And how can you get the ksds file records into your cobol program?
How to print 10 to 1 if the input have only 10 digit number?
What is the difference between PIC 9.99 and 9v99 in COBOL?