View previous topic :: View next topic
|
Author |
Message |
beto981
New User
Joined: 06 Oct 2006 Posts: 24
|
|
|
|
I have an execution with a program running without an input file, just like this:
Code: |
//PASO010 EXEC PGM=IKJEFT01,DYNAMNBR=20
//STEPLIB DD DSN=XXX.SDSNEXIT,DISP=SHR
//INPUT DD DUMMY
//OUTPUT DD DSN=XXXXXXXXXXXXXXXX,,
// DISP=(NEW,CATLG,DELETE),SPACE=XXXXXXXX),
// DCB=(DSORG=PS,BLKSIZE=XX,LRECL=XX,RECFM=FB) |
And I've got an error reading (Abend Code 47) the input file.
Inserting the flollowing lines in the code, the execution was ok:
Code: |
//PASO010 EXEC PGM=IKJEFT01,DYNAMNBR=20
//STEPLIB DD DSN=XXX.SDSNEXIT,DISP=SHR
//INPUT DD DUMMY
//* INPUT DD DSN=XXXXXXXXXXXXX, --> LINE INSERTED
//* DISP=SHR --> LINE INSERTED
//OUTPUT DD DSN=XXXXXXXXXXXXXXXX,,
// DISP=(NEW,CATLG,DELETE),SPACE=XXXXXXXX),
// DCB=(DSORG=PS,BLKSIZE=XX,LRECL=XX,RECFM=FB) |
Does anyone knows why this happened?
Tks! |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
You need to post the expanded JCL from the job listing to give us more information. |
|
Back to top |
|
|
Phrzby Phil
Senior Member
Joined: 31 Oct 2006 Posts: 1042 Location: Richmond, Virginia
|
|
|
|
why the double comma? |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Phrzby Phil wrote: |
why the double comma? |
Yeah, that's a nailed on JCL error.
Phil, maybe he's a commakhazi JCL writer |
|
Back to top |
|
|
Binop B
Active User
Joined: 18 Jun 2009 Posts: 407 Location: Nashville, TN
|
|
|
|
Hi Beto,
Quote from the Manuals for FileStatus 47
Code: |
The execution of a READ statement was attempted on a file not open in the input or I-O mode. |
Look into this to correct your program error ...
but yeah... you were not asking for this ..
Quote: |
Inserting the following lines in the code, the execution was ok:
Does anyone knows why this happened? |
Just to be sure ... You put the two commented lines and maintained the DUMMY statement ?? |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
I wonder if the TS checked the File-Status after the open,
or even if he has a file status clause?
plus, as Binop has suggested, we are, as usual, only being provided info
that the TS thinks is germane to the topic.
as Robert said, unless we can see the full expansion of the JCL and the
messages pertaining to allocation of the INPUT ds as well as messages
generated during the program execution,
we can only conclude
the TS has miss-interpreted the error and has not provided enough info
and of course we have the small problem of the subject:
Loop in a program
what is that nonsense? |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
I agree with Dick I, too, don't understand the subject line. Also, the given JCL is executing IKJEFT01, TSO in batch, with some input/output and nothing else - why in the heaven someone will get a file-status code without a COBOL READ (which is not shown as if it was the case and if not shown, I don't assume anything)? |
|
Back to top |
|
|
ravidhiman
New User
Joined: 09 Oct 2006 Posts: 23 Location: London, UK
|
|
|
|
If you are using cobol program in this step and want to use the dd dummy as input then you need to provide DCB parameters with DD dummy statment. For example :
//FILE2 DD DUMMY,
// DCB=(RECFM=FB,LRECL=80,BLKSIZE=0,DSORG=PS)
The JCL will end with abend if you won't give DCB parameters. Try with DCB parametars and let me know the result. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
ravidhiman wrote: |
...you need to provide DCB parameters with DD dummy statment.
.
.
The JCL with abended if you won't give DCB parameters. |
It depends on the pgm that uses the file. Some IBM Utilities require it. I don't recall which ones, however. But you can test without the DCB. If the pgm fails with a msg pointing to the DUMMY file, you'll know. |
|
Back to top |
|
|
beto981
New User
Joined: 06 Oct 2006 Posts: 24
|
|
|
|
Hi guys,
First of all, sorry for my english... this could cause a mess in the post.
And I thought I had posted the code as request, but I'm seeing that's not here. I'm sending it again:
Code: |
//PASO010 EXEC PGM=IKJEFT01,DYNAMNBR=20
//STEPLIB DD DSN=XXXX.SDSNEXIT,DISP=SHR
// DD DSN=XXXX.SDSNLOAD,DISP=SHR
//INPUT DD DUMMY
//OUTPUT DD DSN=XXXXXXXXXX,
// DISP=(NEW,CATLG,DELETE),
// SPACE=(TRK,(X,X),RLSE),
// DCB=(DSORG=PS,BLKSIZE=X,LRECL=X,RECFM=FB)
//SYSTSPRT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//AMSDUMP DD SYSOUT=*
//SYSUDUMP DD DUMMY
//SYSIN DD DUMMY
//SYSTSIN DD *
DSN S(%%DB2)
RUN PROG(XXXXXXX) -
PLAN(%%PLAN) -
END
/ |
The error:
Code: |
** ERROR **
USER :ABCD
PROCESS :ACBD
STEP :210-READ-INPUT
CODE :10002
FILE :INPUT
ADIT. CODE :47
SEVERITY :08
TYPE :A
|
And I said "Loop" in the subject just because these error lines appear hundreds of times in the sysout. As the input file is DUMMY, I assumed that is a loop case.
To Phrzby Phil and expat: the double comma was my mistake when writing the post.
To Binop B: yes, I put the two commented lines and maintained the DUMMY statement .
Tks! |
|
Back to top |
|
|
beto981
New User
Joined: 06 Oct 2006 Posts: 24
|
|
|
|
The code that performed normally:
Code: |
//PASO010 EXEC PGM=IKJEFT01,DYNAMNBR=20
//STEPLIB DD DSN=XXXX.SDSNEXIT,DISP=SHR
// DD DSN=XXXX.SDSNLOAD,DISP=SHR
//INPUT DD DUMMY
//* INPUT DD DSN=XXXXXXXXXXXXXX,
//* DISP=SHR
//OUTPUT DD DSN=XXXXXXXXXX,
// DISP=(NEW,CATLG,DELETE),
// SPACE=(TRK,(X,X),RLSE),
// DCB=(DSORG=PS,BLKSIZE=X,LRECL=X,RECFM=FB)
//SYSTSPRT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//AMSDUMP DD SYSOUT=*
//SYSUDUMP DD DUMMY
//SYSIN DD DUMMY
//SYSTSIN DD *
DSN S(%%DB2)
RUN PROG(XXXXXXX) -
PLAN(%%PLAN) -
END
/
|
|
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
What is the program attempting to do? What code causes the error to happen the first time?
Why/how might this be a jcl problem?
What are the directions for running this program? |
|
Back to top |
|
|
beto981
New User
Joined: 06 Oct 2006 Posts: 24
|
|
|
|
What is the program attempting to do?
The same JCL is used for more than 1 application. In my case, I don't use it for nothing, that's why the DUMMY in the input file.
What code causes the error to happen the first time?
S222. After playing hundreds of times the error messages above
Why/how might this be a jcl problem?
I don't know. I just received guidance to introduce the 2 commented line in the code, but even that person who gave me guidance doesn't know to explain why this. And it worked.... |
|
Back to top |
|
|
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 1512 Location: Virginia, USA
|
|
|
|
beto981 wrote: |
What is the program attempting to do?
The same JCL is used for more than 1 application. In my case, I don't use it for nothing, that's why the DUMMY in the input file.
|
Then why are you running it? |
|
Back to top |
|
|
beto981
New User
Joined: 06 Oct 2006 Posts: 24
|
|
|
|
Because it's in a sequence of JCLs that I can't change. It would be far easier to run a IEFBR14... but I have to execute this! |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
I would say either leave it running with the two lines commented out (and who knows why that works), or try with
Code: |
//INPUT DD DUMMY,DSORG=PS,RECFM=??,LRECL=???,BLKSIZE=0 |
to see if the 47 goes away. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Look at the code for this particular program and see what functionality is in the code. Then you will know why the DD statement is needed. . . |
|
Back to top |
|
|
UmeySan
Active Member
Joined: 22 Aug 2006 Posts: 771 Location: Germany
|
|
|
|
Hi Sir !
You have to have a closer look in this Programm. Because it runs under DB2 and Input is defined as Dummy, I assume the programm reads input from a DB2-Table and not from a file.
These hundreds of error messages could be a result of a Select or Fetch. |
|
Back to top |
|
|
|