Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Loop in a program

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
beto981

New User


Joined: 06 Oct 2006
Posts: 24

PostPosted: Fri Aug 06, 2010 11:44 pm    Post subject: Loop in a program
Reply with quote

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
View user's profile Send private message

Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7913
Location: Bellevue, IA

PostPosted: Fri Aug 06, 2010 11:49 pm    Post subject:
Reply with quote

You need to post the expanded JCL from the job listing to give us more information.
Back to top
View user's profile Send private message
Phrzby Phil

Active Member


Joined: 31 Oct 2006
Posts: 961
Location: Richmond, Virginia

PostPosted: Sat Aug 07, 2010 9:34 am    Post subject:
Reply with quote

why the double comma?
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Sat Aug 07, 2010 11:11 am    Post subject:
Reply with quote

Phrzby Phil wrote:
why the double comma?
Yeah, that's a nailed on JCL error.

Phil, maybe he's a commakhazi JCL writer icon_biggrin.gif
Back to top
View user's profile Send private message
Binop B

Active User


Joined: 18 Jun 2009
Posts: 407
Location: Nashville, TN

PostPosted: Sat Aug 07, 2010 2:09 pm    Post subject:
Reply with quote

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 ?? icon_rolleyes.gif
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Sat Aug 07, 2010 2:32 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Mon Aug 09, 2010 2:49 pm    Post subject:
Reply with quote

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
View user's profile Send private message
ravidhiman

New User


Joined: 09 Oct 2006
Posts: 23
Location: London, UK

PostPosted: Mon Aug 09, 2010 3:24 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Mon Aug 09, 2010 3:32 pm    Post subject:
Reply with quote

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
View user's profile Send private message
beto981

New User


Joined: 06 Oct 2006
Posts: 24

PostPosted: Tue Aug 10, 2010 12:58 am    Post subject:
Reply with quote

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
View user's profile Send private message
beto981

New User


Joined: 06 Oct 2006
Posts: 24

PostPosted: Tue Aug 10, 2010 1:03 am    Post subject:
Reply with quote

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
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Tue Aug 10, 2010 1:07 am    Post subject:
Reply with quote

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
View user's profile Send private message
beto981

New User


Joined: 06 Oct 2006
Posts: 24

PostPosted: Tue Aug 10, 2010 1:22 am    Post subject:
Reply with quote

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
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Tue Aug 10, 2010 1:27 am    Post subject:
Reply with quote

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
View user's profile Send private message
beto981

New User


Joined: 06 Oct 2006
Posts: 24

PostPosted: Tue Aug 10, 2010 1:32 am    Post subject:
Reply with quote

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
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7913
Location: Bellevue, IA

PostPosted: Tue Aug 10, 2010 2:42 am    Post subject:
Reply with quote

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
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Tue Aug 10, 2010 2:46 am    Post subject:
Reply with quote

Hello,

Quote:
RUN PROG(XXXXXXX)
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
View user's profile Send private message
UmeySan

Active Member


Joined: 22 Aug 2006
Posts: 743
Location: Germany

PostPosted: Tue Aug 10, 2010 3:52 pm    Post subject:
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts I can not compile my program PL1 V3.R... Miguel Fernandez PL/I & Assembler 13 Tue Dec 06, 2016 8:30 pm
No new posts IMS BMP program causes 878 system abend Artemk IMS DB/DC 7 Tue Nov 22, 2016 8:26 pm
No new posts A sample of exit program for exit XMN... lind sh CICS 2 Mon Oct 03, 2016 5:07 pm
No new posts Need points to tune IMS Checkpoint Pr... satish.ms10 IMS DB/DC 2 Fri Sep 30, 2016 4:12 pm
No new posts ISPF program to set SCRNAME prino TSO/ISPF 5 Fri Sep 30, 2016 2:18 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us