IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

please tell me what is meant by JCL ERROR 158


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
minni163
Warnings : 1

New User


Joined: 17 Apr 2009
Posts: 8
Location: hyderabad

PostPosted: Tue Apr 21, 2009 4:48 pm
Reply with quote

please tell me what is meant by JCL ERROR 158
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8796
Location: Welsh Wales

PostPosted: Tue Apr 21, 2009 4:54 pm
Reply with quote

What a shame that you didn't pick psychic day to post, that way we could have seen the output of the job without you needing to post it on the forum.

I believe that you will find that the 158 is just an extraneous piece of text written out by the JES subsystem, and the real cause of the JCL error is clearly stated in the text that you have not bothered to post.
Back to top
View user's profile Send private message
minni163
Warnings : 1

New User


Joined: 17 Apr 2009
Posts: 8
Location: hyderabad

PostPosted: Tue Apr 21, 2009 5:05 pm
Reply with quote

what is invalid in below coding:

//DEFEMPTY EXEC PGM=SORT
//SYSIN DD *
SORT FIELDS=COPY
/*

throwing invalid jcl statements for above lines.
Back to top
View user's profile Send private message
anandinmainframe

Active User


Joined: 31 May 2007
Posts: 171
Location: India

PostPosted: Tue Apr 21, 2009 5:08 pm
Reply with quote

minni163,
Can you post the complete info(Error) you can see in the spool as well as the complete JCL.
Back to top
View user's profile Send private message
minni163
Warnings : 1

New User


Joined: 17 Apr 2009
Posts: 8
Location: hyderabad

PostPosted: Tue Apr 21, 2009 5:14 pm
Reply with quote

jcl:
job calling a cataloged proc named TEST001P
PROC consists of
//TEST001P PROC
//DEFEMPTY EXEC PGM=SORT
//SYSIN DD *
SORT FIELDS=COPY
/*
//SORTIN DD DSN=IPTP.PDSN.CREATE.TEST,DISP=SHR
//SORTOUT DD DSN=IPTT.PDSN.CREATE.TEST,
// DISP=(NEW,CATLG,DELETE),
// UNIT=SYSDA,
// SPACE=(CYL,(10,10),RLSE),
// DCB=(LRECL=80,BLKSIZE=0,RECFM=FB)
//SYSLOG DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//*

JESYSMSG IN SPOOL:
STMT NO. MESSAGE
4 IEFC001I PROCEDURE TEST001P WAS EXPANDED USING PRIVATE LIBRARY DEV1.PR
7 IEFC601I INVALID JCL STATEMENT
8 IEFC601I INVALID JCL STATEMENT
9 IEFC601I INVALID JCL STATEMENT
16 IEFC001I PROCEDURE ENDJOB WAS EXPANDED USING PRIVATE LIBRARY DEV1.PROC
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8700
Location: Dubuque, Iowa, USA

PostPosted: Tue Apr 21, 2009 5:20 pm
Reply with quote

From the JCL Language Reference (link at the top of the page):
Quote:
12.2.5 Location in the JCL

A DD * statement begins an in-stream data set.

In-stream Data for Cataloged or In-stream Procedures

A cataloged or in-stream procedure cannot contain a DD * statement.
Rewrite your PROC to get rid of the DD *
Back to top
View user's profile Send private message
anandinmainframe

Active User


Joined: 31 May 2007
Posts: 171
Location: India

PostPosted: Tue Apr 21, 2009 5:21 pm
Reply with quote

Mani,
Can you try the below JCL
//TEST001P PROC
//DEFEMPTY EXEC PGM=SORT
//SYSLOG DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//SORTIN DD DSN=IPTP.PDSN.CREATE.TEST,DISP=SHR
//SORTOUT DD DSN=IPTT.PDSN.CREATE.TEST,
// DISP=(NEW,CATLG,DELETE),
// UNIT=SYSDA,
// SPACE=(CYL,(10,10),RLSE),
// DCB=(LRECL=80,BLKSIZE=8000,RECFM=FB)
//SYSIN DD *
SORT FIELDS=COPY
/*
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10888
Location: italy

PostPosted: Tue Apr 21, 2009 5:23 pm
Reply with quote

You just shuffled the cards,
the inline data is still inside the proc
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8700
Location: Dubuque, Iowa, USA

PostPosted: Tue Apr 21, 2009 5:23 pm
Reply with quote

anandinmainframe: did you try it on your machine? What results did you get?
Back to top
View user's profile Send private message
minni163
Warnings : 1

New User


Joined: 17 Apr 2009
Posts: 8
Location: hyderabad

PostPosted: Tue Apr 21, 2009 5:37 pm
Reply with quote

The job is successful after making instream sysin card into catalogued.

Thank you frenz.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8700
Location: Dubuque, Iowa, USA

PostPosted: Tue Apr 21, 2009 5:41 pm
Reply with quote

Glad to hear it worked.
Back to top
View user's profile Send private message
Bill Dennis

Active Member


Joined: 17 Aug 2007
Posts: 562
Location: Iowa, USA

PostPosted: Tue Apr 21, 2009 7:32 pm
Reply with quote

minni163 wrote:
please tell me what is meant by JCL ERROR 158
The number (158 in your case) is a multi-line WTO identifier.

If there are additional message lines to explain the error, they will begin with the same number to show that they go together as a set.

Even though the logic prepares for it, there are not always additional lines so the number is sometimes meaningless.
Back to top
View user's profile Send private message
Terry Heinze

JCL Moderator


Joined: 14 Jul 2008
Posts: 1248
Location: Richfield, MN, USA

PostPosted: Tue Apr 21, 2009 7:51 pm
Reply with quote

Mani, next time please post the requested information. We have no idea what statements 4, 7, 8, 9, and 16 are unless you show ALL relevant information. If I remember correctly, the JESJCL data set is the one that shows statement number along with the statement.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts IEW2315E 1369 Link error All Other Mainframe Topics 3
No new posts Help on IMS -API URL migrating from P... IMS DB/DC 1
No new posts JES datasets IO Error ABENDS & Debugging 3
No new posts Error to invoke MPP program through B... IMS DB/DC 3
No new posts PKZIP error ZPFM121E and ZPCE009E JCL & VSAM 6
Search our Forums:

Back to Top