View previous topic :: View next topic
|
Author |
Message |
pavithraa
New User
Joined: 14 Nov 2006 Posts: 12
|
|
|
|
Could anyone please let me know how to comment multiple lines in JCL.. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Place //* in pos 1-3 of each statement that is to be a comment. |
|
Back to top |
|
|
pavithraa
New User
Joined: 14 Nov 2006 Posts: 12
|
|
|
|
thanks a lot dick....
but is there possibility of commenting multiple lines instead of commenting each and every line? |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
You're welcome
Not that i'm aware of. It's been that way for a long time. |
|
Back to top |
|
|
pavithraa
New User
Joined: 14 Nov 2006 Posts: 12
|
|
|
|
Could anyone please let me know is there any possibility of commenting multiple lines instead of commenting each and every line? |
|
Back to top |
|
|
hemanth.nandas
Active User
Joined: 18 Aug 2007 Posts: 120 Location: India
|
|
|
|
Hi Pavithra,
Please read Syntax Rule Of JCL Statements..
When system Finds // , It always checks for 3rd position (Coding command or statement or paramenter is Optional).
Even Forth position also for JES3 Statement if you included * .
This is how system finds difference in statements.
As yet, There is no command to get rid of this (as I believe & If so It will become a New research in Mainframe ).
Thanks & Regards |
|
Back to top |
|
|
nuthan
Active User
Joined: 26 Sep 2005 Posts: 146 Location: Bangalore
|
|
|
|
JCL should be commented as you would any programming language. The comments statement contains //* in columns 1 to 3, with the remaining columns containing any desired comments.
They can be placed before or after any JCL statements following the JOB statement to help document the JCL. Comments can also be coded on any JCL statement by leaving a blank field after the operand field. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
Quote: |
Could anyone please let me know is there any possibility of commenting multiple lines instead of commenting each and every line? |
what was wrong in Dick's reply that left You not satisfied and made You ask again ???
WHAT ABOUT READING THE MANUAL
THE LINK IS AT THE TOP OF THE PAGE "MANUALS" |
|
Back to top |
|
|
Aaru
Senior Member
Joined: 03 Jul 2007 Posts: 1287 Location: Chennai, India
|
|
|
|
Quote: |
Could anyone please let me know is there any possibility of commenting multiple lines instead of commenting each and every line? |
First label the lines that you want to comment ( say .A and .B)
Code: |
.A //S1 EXEC PGM=SORT
000004 //SYSOUT DD SYSOUT=*
.B //SORTIN DD *
|
Then issue the following command
Code: |
c all '//' '//*' .a .b
|
Hope this helps |
|
Back to top |
|
|
hemanth.nandas
Active User
Joined: 18 Aug 2007 Posts: 120 Location: India
|
|
|
|
Hi Aaru,
Quote: |
c all '//' '//*' .a .b
|
I am not getting this, pls explain clearly.
Thanks & Regards |
|
Back to top |
|
|
murmohk1
Senior Member
Joined: 29 Jun 2006 Posts: 1436 Location: Bangalore,India
|
|
|
|
Hemantha,
Change all '//' to '//*' between the lables .a and .b (range). |
|
Back to top |
|
|
hemanth.nandas
Active User
Joined: 18 Aug 2007 Posts: 120 Location: India
|
|
|
|
Hi Murali,
Quote: |
Change all '//' to '//*' between the lables .a and .b (range).
|
Thanx, |
|
Back to top |
|
|
Aaru
Senior Member
Joined: 03 Jul 2007 Posts: 1287 Location: Chennai, India
|
|
|
|
Quote: |
am not getting this, pls explain clearly. |
Hope you have understood now.
We are first setting up a range and then we are changing the charecters within the range. Forgot to post the output code in my last post.
Code: |
//*S1 EXEC PGM=SORT
//*SYSOUT DD SYSOUT=*
//*SORTIN DD *
|
|
|
Back to top |
|
|
hemanth.nandas
Active User
Joined: 18 Aug 2007 Posts: 120 Location: India
|
|
|
|
Hi All,
Pavithra was asking for a command to comment multiple line instead of commenting each & every line.
Changing all between labels is common while coding, That I too know what you had done it, But this is not the one to do the same. Ofcourse we can achieve the same with logic.
Thanx & Regards |
|
Back to top |
|
|
Aaru
Senior Member
Joined: 03 Jul 2007 Posts: 1287 Location: Chennai, India
|
|
|
|
pavitra,
In Rexx we usually comment multiple statements as shown below
/*
statement 1
statement 2
statement 3
*/
Are you looking for similar thing in JCL? Please clarify. |
|
Back to top |
|
|
pavithraa
New User
Joined: 14 Nov 2006 Posts: 12
|
|
|
|
yes Aaru exactly like that ...... |
|
Back to top |
|
|
pavithraa
New User
Joined: 14 Nov 2006 Posts: 12
|
|
|
|
thanks a lot Aaru
'C all ' is working fine....
Thank you all for your suggestions..... |
|
Back to top |
|
|
Aaru
Senior Member
Joined: 03 Jul 2007 Posts: 1287 Location: Chennai, India
|
|
|
|
Pavithra,
I dont think it is possible to comment multiple lines in JCL as we do in rexx. |
|
Back to top |
|
|
hemanth.nandas
Active User
Joined: 18 Aug 2007 Posts: 120 Location: India
|
|
|
|
Hi Aaru,
Quote: |
Are you looking for similar thing in JCL? Please clarify. |
I hope the topic tells it, I mean 'YES'
Ragards |
|
Back to top |
|
|
pavithraa
New User
Joined: 14 Nov 2006 Posts: 12
|
|
|
|
Yes Aaru exactly like that
Thanks a lot 'C all' with label is working fine.
Thank you all for your suggetsions. |
|
Back to top |
|
|
agkshirsagar
Active Member
Joined: 27 Feb 2007 Posts: 691 Location: Earth
|
|
|
|
Quote: |
Commenting multiple lines |
- May not be possible exactly like you want but you can add a null statement in between so that all the lines after null will be ignored.
//stmt1
//stmt2
//stmt3
//stmt4
// ..... nulll
//blah
//blah
//blah
All the 'blah' will be ignored . |
|
Back to top |
|
|
hemanth.nandas
Active User
Joined: 18 Aug 2007 Posts: 120 Location: India
|
|
|
|
Hi Abhijit Kshirsagar,
Quote: |
//stmt1
//stmt2
//stmt3
//stmt4
// ..... nulll
//blah
//blah
//blah
All the 'blah' will be ignored . |
If I want to consider after blah I mean stmt5 or stmt6, Is it there any way get rid of it in same Job? I mean without writting another JOB Card? ;-)
Quote: |
Thanks a lot 'C all' with label is working fine. |
Good Aaru, Thanx for making it
Thanks & Regards |
|
Back to top |
|
|
Aaru
Senior Member
Joined: 03 Jul 2007 Posts: 1287 Location: Chennai, India
|
|
|
|
Thanks abhijit.
NULL statement indicates the end of a job. As you said, only way is to add a JOB card.
Techies, please let us know if there is any other option. |
|
Back to top |
|
|
murmohk1
Senior Member
Joined: 29 Jun 2006 Posts: 1436 Location: Bangalore,India
|
|
|
|
Aaru,
Quote: |
NULL statement indicates the end of a job. As you said, only way is to add a JOB card. |
Its always BAD IDEA to add second job statement inside a single pds member. This results is submission of TWO jobs with a single submission, which may effect the process. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hedllo,
Quote: |
Are you looking for similar thing in JCL? Please clarify. |
Yes, that is what is wanted.
It could be coded, but it won't work. . . . |
|
Back to top |
|
|
|