View previous topic :: View next topic
|
Author |
Message |
grabeva
New User
Joined: 07 Sep 2006 Posts: 23
|
|
|
|
Hello,
I need help!!!!
I have a cobol-program who get message from a queue.
At that queue have several messages, in that have an code who determine
the file i want to generate.
my job is that:
//XT0010 EXEC PGM=XTPMQ001,REGION=4096K
//STEPLIB DD DSN=ENDEVOR.ADMINWRK.LOADLIB,DISP=SHR
// DD DSN=MQM.V6R0.SCSQANLE,DISP=SHR
// DD DSN=MQMD.MQD1.SCSQAUTH,DISP=SHR
// DD DSN=MQM.V6R0.SCSQAUTH,DISP=SHR
//ASIENTOS DD DSN=TSBA.XT.DI.CONTABLE.ASIENTOS(+1),
// DISP=(,CATLG,DELETE),
// SPACE=(TRK,(3000,100),RLSE),
// RECFM=FB,LRECL=470
//BASE DD DSN=TSBA.XT.DI.CONTABLE.BASE(+1),
// DISP=(,CATLG,DELETE),
// SPACE=(TRK,(3000,100),RLSE),
// RECFM=FB,LRECL=470
the message have in pos 1: 1000 its correspond to create ASIENTOS, but
must not create BASE.
if i run job, create 1 generation from ASIENTOS y from BASE....
Can someone help me????? |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
but must not create BASE. |
Then the JCL posted will not work. As written, both files will be created whether they are opened and written or not. . .
To do what i believe you want, you would need to determine if one, the other, or both files are to be created and submit the appropriate jcl thru the Internal Reader (there are multiple Internal Reader topics in the forum).
This is actually a jcl question rather than a mq question. |
|
Back to top |
|
|
grabeva
New User
Joined: 07 Sep 2006 Posts: 23
|
|
|
|
the job open both files, and write in one of them.
but alloc both files. This i dont wont.....
i want to write the correct file, and not alloc de other one.
if a could help me?
use JCL?
o user dynamic alloc? who module? i never use dynamic alloc.
thks |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Please re-read my earlier post. . . The JCL you currently have cannot work.
One easy way to do what you want is to determine which file will actually be created and submit jcl "on the fly" (Internal Reader) that will create the one file you want and not the other. In this submitted jcl, the file to be written would be the definition as you have now - the "not-written" file could be defined as DUMMY.
Also, as i mentioned, there are many Internal Reader topics in the forum. If you find something that is not clear, post what you found and your doubt. SOmeone will be able to clarify.
Quote: |
i never use dynamic alloc. |
Most people have not. . . You can do what you want without using any kind of dynamic allocation in your code. . . |
|
Back to top |
|
|
grabeva
New User
Joined: 07 Sep 2006 Posts: 23
|
|
|
|
at the instalation couldnt run internal reader..... |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
I have never seen an installation that did not have the internal reader. . .
Someone may say "no", but the functionality is there. . .
If submitting the correct jcl is not permitted, then you can add additional steps to the existing job to conditionally execute depending on which file should be created. One step would determine which file is to be written and the the next 2 would be conditionally executed to only create the file that is needed. |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
or change the program that reads mqs and writes:
rc=1 if first file is used
rc=2 if second file is used
next two steps delete a file based on condition code
or
use if logic.
cons for dynamic allocation by cobol program:
1. learning curve
2. very hard to document
pros for NOT using dynamic allocation
1. implemented changes are easy to test and debug
2. easily documented
3. jes output easy to audit and debug. |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
in addition:
code to implement condition codes and the extra JCL will take about 15 mins to code and test.
code to implement dynamic will take about 15 days. |
|
Back to top |
|
|
|