Posted: Thu Aug 11, 2005 1:49 am Post subject: JCL needed to store the output of a query in a card
My requirement is that i have to execute a COBOL-DB2 program which needs the input from the run of a complex query in a card and the results of the output of the query needs to be my input dataset for the program from where my program should read data and & i am coding the JCL below ,please verify if i am correct.Morever i have to also pass the date "2005-01-01" from the JCL to the COBOL-DB2 Program.
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
Posted: Thu Aug 11, 2005 4:01 am Post subject:
Quote:
My requirement is that i have to execute a COBOL-DB2 program which needs the input from the run of a complex query in a card and the results of the output of the query needs to be my input dataset for the program from where my program should read data and & i am coding the JCL below ,please verify if i am correct.
Shekar123,
There are a couple of errors in your JCL. Your JCL should have 2 steps. The first step is to unload the data by execueting your query.
Second is to use that output as input to your cobol-db2 program.
1. You had just one step that runs your program. so add the unload step.
Posted: Thu Aug 11, 2005 7:25 am Post subject: JCL needed to store the output of a query in a card
Thanks Kolusu,
I have understand you concept of trying to acheive the required results & approach and i have gone through the links provided by you which were really very very heplful.I am trying to work on those two steps given by you.Thanks & Best Regards.
Joined: 15 Dec 2002 Posts: 637 Topics: 43 Location: Bengaluru, INDIA
Posted: Thu Aug 11, 2005 8:48 am Post subject:
If your program is compiled with LE runtime modules, then you must use a slash to separate the LE runtime parameters and program parameters. Thus, with LE, your PARM will look as follows:
Code:
//SYSTSIN DD *
DSN SYSTEM(DSNP)
RUN PROGRAM(DB2PROG) PLAN(DB2PROG) PARMS('2005-01-01/')
END
/*
Definition in COBOL program will not change. _________________ ALL opinions are welcome.
Debugging tip:
When you have eliminated all which is impossible, then whatever remains, however improbable, must be the truth.
-- Sherlock Holmes.
Joined: 15 Dec 2002 Posts: 637 Topics: 43 Location: Bengaluru, INDIA
Posted: Thu Aug 11, 2005 8:49 am Post subject:
oh!
The original poster has the slash already. I looked into Kolusu's post and the link pasted in the previous post. _________________ ALL opinions are welcome.
Debugging tip:
When you have eliminated all which is impossible, then whatever remains, however improbable, must be the truth.
-- Sherlock Holmes.
Posted: Wed Aug 17, 2005 1:50 am Post subject: JCL NEEDED TO EXECUTE THE PROGRAM
I have a requirement wherin i have to do the following:
I want to pass some values to the COBOL-DB2 program which i am doing in the PARM PARAMETER,as well as pass data from the control card to the Program,as well as i want to read from the input dataset.How can i do it ? I have coded the JCL like this below.Can anybody guide me whether i am right / wrong ?
Please also guide me how should i code in my program to accept all these conditions in my program to pass as well as read from the Parm,control card and from the input dataset ?
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
Posted: Wed Aug 17, 2005 8:05 am Post subject:
Shekhar123,
You can pass your parms as you have shown in your JCL using the PARMS statement which can be accessed via linkage section. Also you can use SYSIN to read your CARDS job.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum