View previous topic :: View next topic
|
Author |
Message |
Nithya Usha Mohanan
New User
Joined: 16 Oct 2007 Posts: 7 Location: pune
|
|
|
|
Hi,
I am executing a jcl calling a proc and getting a strange error while doing JCK in changeman.
After the proc getting called in the first step of the proc viz
//PROCNAME PROC CNTL = 'abc.xyz.deg',
// UNIT = 'sysda'
it is giving error " Misplaced statement" . the next statement is
//EXEC PGM = IEFBR14
the calling JCl looks fine and the proc is getting called too...
Could you please suggest me the reasons of this error? |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
My best guess is, since UNIT is a reserved word, that it appears to be misplaced. You should probably try something else, like UNT. |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Whoops, I replied whilst superk was moving it. Content no longer relevant. |
|
Back to top |
|
|
Nithya Usha Mohanan
New User
Joined: 16 Oct 2007 Posts: 7 Location: pune
|
|
|
|
thanks superk,
but i ran it commenting unit out , still not working....
regards,
nithya |
|
Back to top |
|
|
ridgewalker58
New User
Joined: 26 Sep 2008 Posts: 51 Location: New York
|
|
|
|
Without any more information than what you provided, I can only make ASSUMPTIONS:
I have to ASSUME that the line //EXEC PGM = IEFBR14
is EXACTLY as you coded it:
Therefore, I would ALSO give you JCL error.
The format of an EXECUTE statement is:
'//' followed by a STEPNAME or atleast one SPACE
followed by EITHER
"EXEC PGM=your program name"
or
"EXEC PROCNAME"
for example:
//STEP001 EXEC PGM=IEFBR14
****** WITH NO SPACES IN THE PGM=IEFBR14 |
|
Back to top |
|
|
ridgewalker58
New User
Joined: 26 Sep 2008 Posts: 51 Location: New York
|
|
|
|
I had assumed that UNIT had been a Symbolic parameter which was defined WITHIN the PROC
UNIT=&UNIT
&UNIT to be replaced in the Execution JCL with
something like UNIT=SYSDA |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
Nevermind, I just tested that PROC, and it works fine with UNIT as a symbolic parameter.
I don't have JCK or Changeman available, so I can't comment further. |
|
Back to top |
|
|
Phrzby Phil
Senior Member
Joined: 31 Oct 2006 Posts: 1049 Location: Richmond, Virginia
|
|
|
|
Unless we see code cut&pasted between code tags, we are wasting our time. |
|
Back to top |
|
|
ridgewalker58
New User
Joined: 26 Sep 2008 Posts: 51 Location: New York
|
|
|
|
Superk, Bill and Phil -- I have noticed that you "all" spend time answering questions and giving solutions ---- BUT I have noticed
that RARELY the person who is asking the question -- has the
time to give you the response " yes it worked"
I believe the problem is that he coded it as
//EXEC PGM = IEFBR14
instead of
//STEP001 EXEC PGM=IEFBR14 |
|
Back to top |
|
|
Phrzby Phil
Senior Member
Joined: 31 Oct 2006 Posts: 1049 Location: Richmond, Virginia
|
|
|
|
I absolutely agree - and cut&pasted code would have shown that right away. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
|
|
|
|
There are a lot of loose ends in your question, Nithya.
Quote: |
error while doing JCK in changeman |
Does it work when you are not in Change-Man. Change-Man has many sub-routines, which might cause such problems but they are site specific. Such as, at one of my shop, we were supposed to have a component of type "JCQ", which will have all the RESTART and any other relevant info for the corresponding Job - without it, syntax check wil show some weired error.
Quote: |
it is giving error " Misplaced statement" . the next statement is |
What is "next" here? why do you look at "next statement" and why not at the exact statement which is flagged? |
|
Back to top |
|
|
Nithya Usha Mohanan
New User
Joined: 16 Oct 2007 Posts: 7 Location: pune
|
|
|
|
Hi everyone,
Thanks for all ur suggestion.This issue is now resolved,
but the real culprit was a set of comments given before the
(procname) PROC statement in the proc . Since it was not my proc and JCl and i was helping in resolving the error, it didnt cross my mind at all abt the comments given at the starting of the proc ... Now i have given it after the PROC statement and things are working fine...
but the confusion was bcoz the error was flagged at the PROC statement.
I should really say thank you to everyone in this site coz whenever i am really facing an issue i really depend on the many comments and help available here... |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
|
|
|
|
Glad to hear that! |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
ridgewalker58 wrote: |
Superk, Bill and Phil -- I have noticed that you "all" spend time answering questions and giving solutions ---- BUT I have noticed
that RARELY the person who is asking the question -- has the
time to give you the response " yes it worked"
|
Perhaps I rarely give the correct solution? This time, I was just whining about it being in the Cobol forum. Since we got some thanks anyway, perhaps I should do it more often... |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10886 Location: italy
|
|
|
|
Quote: |
Thanks for all ur suggestion.This issue is now resolved,
but the real culprit was a set of comments given before the
(procname) PROC statement in the proc . |
the conclusion is WRONG
I got curious and checked
here is the job
Code: |
****** ***************************** Top of Data ******************************
000001 //ENRICO@A JOB (ACCT#),'ZPROC',NOTIFY=ENRICO,
000002 // CLASS=A,MSGCLASS=X,MSGLEVEL=(1,1)
000003 //* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
000004 //* DSN=ENRICO.TEST.JCL(IEFBR14)
000005 //* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
000006 // JCLLIB ORDER=(ENRICO.TEST.JCL)
000007 //* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
000008 //*
000009 //S0 EXEC ZPROC
****** **************************** Bottom of Data ****************************
|
and here the proc
note the comments before the PROC statement
Code: |
****** ***************************** Top of Data ******************************
000001 //*
000002 //* BEFORE
000003 //*
000004 //ZPROC PROC P=IEFBR14
000005 //IEF EXEC PGM=&P
000006 //SYSPRINT DD SYSOUT=*
****** **************************** Bottom of Data **************************** |
and it was happily executed
Code: |
********************************* TOP OF DATA **********************************
J E S 2 J O B L O G -- S Y S T E M S Y S 1 -- N
09.59.09 JOB00299 ---- TUESDAY, 07 JUN 2011 ----
09.59.09 JOB00299 IRR010I USERID ENRICO IS ASSIGNED TO THIS JOB.
09.59.10 JOB00299 ICH70001I ENRICO LAST ACCESS AT 09:58:53 ON TUESDAY, JUNE 7
09.59.10 JOB00299 $HASP373 ENRICO@A STARTED - INIT 1 - CLASS A - SYS SYS1
09.59.10 JOB00299 IEF403I ENRICO@A - STARTED - TIME=09.59.10
09.59.10 JOB00299 IEF404I ENRICO@A - ENDED - TIME=09.59.10
09.59.10 JOB00299 $HASP395 ENRICO@A ENDED
------ JES2 JOB STATISTICS ------
07 JUN 2011 JOB EXECUTION DATE
9 CARDS READ
43 SYSOUT PRINT RECORDS
0 SYSOUT PUNCH RECORDS
2 SYSOUT SPOOL KBYTES
0.00 MINUTES EXECUTION TIME
1 //ENRICO@A JOB (ACCT#),'ZPROC',NOTIFY=ENRICO,
// CLASS=A,MSGCLASS=X,MSGLEVEL=(1,1)
//* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
//* DSN=ENRICO.TEST.JCL(IEFBR14)
//* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2 // JCLLIB ORDER=(ENRICO.TEST.JCL)
//* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
//*
3 //S0 EXEC ZPROC
XX*
XX* BEFORE
XX*
4 XXZPROC PROC P=IEFBR14
5 XXIEF EXEC PGM=&P
IEFC653I SUBSTITUTION JCL - PGM=IEFBR14
6 XXSYSPRINT DD SYSOUT=*
STMT NO. MESSAGE
3 IEFC001I PROCEDURE ZPROC WAS EXPANDED USING PRIVATE LIBRARY ENRICO.TES
ICH70001I ENRICO LAST ACCESS AT 09:58:53 ON TUESDAY, JUNE 7, 2011
IEF236I ALLOC. FOR ENRICO@A IEF S0
IEF237I JES2 ALLOCATED TO SYSPRINT
IEF142I ENRICO@A IEF S0 - STEP WAS EXECUTED - COND CODE 0000
IEF285I ENRICO.ENRICO@A.JOB00299.D0000101.? SYSOUT
IEF373I STEP/IEF /START 2011158.0959
IEF374I STEP/IEF /STOP 2011158.0959 CPU 0MIN 00.01SEC SRB 0MIN 00.00S
IEF375I JOB/ENRICO@A/START 2011158.0959
IEF376I JOB/ENRICO@A/STOP 2011158.0959 CPU 0MIN 00.01SEC SRB 0MIN 00.00S
******************************** BOTTOM OF DATA ********************************
|
as usually we wasted time on symptoms due to a broken jcl checker
and to the scarce analysis skill of the ts |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
|
|
|
|
Have fun, enrico! |
|
Back to top |
|
|
|