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

Comment multiple lines in JCL


IBM Mainframe Forums -> JCL & VSAM
Post new topic   This topic is locked: you cannot edit posts or make replies.
View previous topic :: View next topic  
Author Message
pavithraa

New User


Joined: 14 Nov 2006
Posts: 12

PostPosted: Thu Oct 11, 2007 12:22 pm
Reply with quote

Could anyone please let me know how to comment multiple lines in JCL..
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Thu Oct 11, 2007 12:26 pm
Reply with quote

Hello,

Place //* in pos 1-3 of each statement that is to be a comment.
Back to top
View user's profile Send private message
pavithraa

New User


Joined: 14 Nov 2006
Posts: 12

PostPosted: Thu Oct 11, 2007 12:31 pm
Reply with quote

thanks a lot dick....

but is there possibility of commenting multiple lines instead of commenting each and every line?
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Thu Oct 11, 2007 12:34 pm
Reply with quote

You're welcome icon_smile.gif

Not that i'm aware of. It's been that way for a long time.
Back to top
View user's profile Send private message
pavithraa

New User


Joined: 14 Nov 2006
Posts: 12

PostPosted: Thu Oct 11, 2007 12:36 pm
Reply with quote

Could anyone please let me know is there any possibility of commenting multiple lines instead of commenting each and every line?
Back to top
View user's profile Send private message
hemanth.nandas

Active User


Joined: 18 Aug 2007
Posts: 120
Location: India

PostPosted: Thu Oct 11, 2007 1:09 pm
Reply with quote

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 icon_lol.gif ).

Thanks & Regards
Back to top
View user's profile Send private message
nuthan

Active User


Joined: 26 Sep 2005
Posts: 146
Location: Bangalore

PostPosted: Thu Oct 11, 2007 1:27 pm
Reply with quote

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

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Thu Oct 11, 2007 1:31 pm
Reply with quote

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

Senior Member


Joined: 03 Jul 2007
Posts: 1287
Location: Chennai, India

PostPosted: Thu Oct 11, 2007 2:01 pm
Reply with quote

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

Active User


Joined: 18 Aug 2007
Posts: 120
Location: India

PostPosted: Thu Oct 11, 2007 2:11 pm
Reply with quote

Hi Aaru,

Quote:
c all '//' '//*' .a .b


I am not getting this, pls explain clearly.


Thanks & Regards
Back to top
View user's profile Send private message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1436
Location: Bangalore,India

PostPosted: Thu Oct 11, 2007 2:13 pm
Reply with quote

Hemantha,

Change all '//' to '//*' between the lables .a and .b (range).
Back to top
View user's profile Send private message
hemanth.nandas

Active User


Joined: 18 Aug 2007
Posts: 120
Location: India

PostPosted: Thu Oct 11, 2007 2:18 pm
Reply with quote

Hi Murali,

Quote:
Change all '//' to '//*' between the lables .a and .b (range).


Thanx,
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1287
Location: Chennai, India

PostPosted: Thu Oct 11, 2007 2:22 pm
Reply with quote

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

Active User


Joined: 18 Aug 2007
Posts: 120
Location: India

PostPosted: Thu Oct 11, 2007 2:30 pm
Reply with quote

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

Senior Member


Joined: 03 Jul 2007
Posts: 1287
Location: Chennai, India

PostPosted: Thu Oct 11, 2007 2:42 pm
Reply with quote

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

New User


Joined: 14 Nov 2006
Posts: 12

PostPosted: Thu Oct 11, 2007 2:47 pm
Reply with quote

yes Aaru exactly like that ......
Back to top
View user's profile Send private message
pavithraa

New User


Joined: 14 Nov 2006
Posts: 12

PostPosted: Thu Oct 11, 2007 2:51 pm
Reply with quote

thanks a lot Aaru

'C all ' is working fine....

Thank you all for your suggestions.....
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1287
Location: Chennai, India

PostPosted: Thu Oct 11, 2007 2:51 pm
Reply with quote

Pavithra,

I dont think it is possible to comment multiple lines in JCL as we do in rexx.
Back to top
View user's profile Send private message
hemanth.nandas

Active User


Joined: 18 Aug 2007
Posts: 120
Location: India

PostPosted: Thu Oct 11, 2007 2:53 pm
Reply with quote

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

New User


Joined: 14 Nov 2006
Posts: 12

PostPosted: Thu Oct 11, 2007 2:54 pm
Reply with quote

Yes Aaru exactly like that

Thanks a lot 'C all' with label is working fine.

Thank you all for your suggetsions.
Back to top
View user's profile Send private message
agkshirsagar

Active Member


Joined: 27 Feb 2007
Posts: 691
Location: Earth

PostPosted: Thu Oct 11, 2007 2:54 pm
Reply with quote

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

Active User


Joined: 18 Aug 2007
Posts: 120
Location: India

PostPosted: Thu Oct 11, 2007 3:08 pm
Reply with quote

Hi Abhijit Kshirsagar,

Quote:
//stmt1
//stmt2
//stmt3
//stmt4
// ..... nulll
//blah
//blah
//blah

All the 'blah' will be ignored .
icon_lol.gif

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 icon_exclaim.gif

Thanks & Regards
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1287
Location: Chennai, India

PostPosted: Thu Oct 11, 2007 3:24 pm
Reply with quote

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

Senior Member


Joined: 29 Jun 2006
Posts: 1436
Location: Bangalore,India

PostPosted: Thu Oct 11, 2007 3:44 pm
Reply with quote

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

Moderator Emeritus


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

PostPosted: Thu Oct 11, 2007 6:27 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   This topic is locked: you cannot edit posts or make replies. View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM Goto page 1, 2  Next

 


Similar Topics
Topic Forum Replies
No new posts INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts Multiple table unload using INZUTILB DB2 2
No new posts Grouping by multiple headers DFSORT/ICETOOL 7
No new posts How to append a PS file into multiple... JCL & VSAM 3
Search our Forums:

Back to Top