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

Continuation to next line in JCL


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
vikas kumar jain

New User


Joined: 02 Aug 2006
Posts: 9
Location: noida

PostPosted: Fri Apr 17, 2009 11:11 am
Reply with quote

I've a very long line to pass through JCL to a proc. It's as follows :
//SUBJECT=&MAR.USERID.&LIne.PLEASE&line.VERIFY&line.MRGWSBRO
// &line.BESTANDEN&line.ABR&line.AANWEZIG&line.

I've tried to give X,* etc at 72 column for continuation.
But it's not working...it's taking only first line and neglecting second. can u suggest ?
Back to top
View user's profile Send private message
mtaylor

Active User


Joined: 20 Feb 2009
Posts: 108
Location: Kansas City

PostPosted: Fri Apr 17, 2009 7:46 pm
Reply with quote

The only way a statement will continue to the next line is if the last character in the parameter list is a comma OR if it's an unclosed string literal that ends at column 71 (then continues at column 16 on the next, non comment line). IF statements continue until the THEN key word is found. A character in column 72 of an uncontinued line indicates the next line is a comment.

So to sum up: you can't do that.
Back to top
View user's profile Send private message
Bill Dennis

Active Member


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

PostPosted: Sat Apr 18, 2009 1:16 am
Reply with quote

As mtaylor outlined the requirements (which you may have looked up already?) :

1. enclose string in quotes
2. code line 1 thru col 71
3. 'x' in col 72
4. continue line 2 in col 16

You can do a continuation like that.
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Sat Apr 18, 2009 1:21 am
Reply with quote

Bill Dennis wrote:
You can do a continuation like that.
But what will happen if those "&line"s are going to be replaced by a variable larger or smaller than five characters?
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Sat Apr 18, 2009 1:36 pm
Reply with quote

Hi,

Quote:
But what will happen if those "&line"s are going to be replaced by a variable larger or smaller than five characters?


It shoudn't matter what the length of the variable is.


Gerry
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: Sun Apr 19, 2009 2:08 am
Reply with quote

The length of the expanded value of MAR is going to have an effect as well as the length of LINE.
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Mon Apr 20, 2009 4:58 am
Reply with quote

Hi Terry,

what I should have said is as long as the total length of the PARM does not exceed 100 characters.

Having a length greater or less than the variable is not a problem, I'm assumed CICS Guy was concerned if the expanded format did not finish in col 71.

This could be an easier way to achieve the result

Code:
// SET  V1=&MAR.USERID.&LINE.PLEASE&LINE.VERIFY&LINE.MRGWSBRO           
// SET  V2=&LINE.BESTANDEN&LINE.ABR&LINE.AANWEZIG&LINE.                 
// SET  V3=&V1&V2                                                       
//      SUBJECT=&V3                                                     



Gerry
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Mon Apr 20, 2009 5:27 am
Reply with quote

Quote:
This could be an easier way to achieve the result
The very point I was aiming for....
Quote:
Having a length greater or less than the variable is not a problem, I'm assumed CICS Guy was concerned if the expanded format did not finish in col 71.
But, if the "X" is in column 71 and the five byte "&line" was actually four bytes long, would the CC71 "X" still be in CC71?
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Mon Apr 20, 2009 6:39 am
Reply with quote

Hi CICS Guy,



It's not a problem if the five byte &line is only four bytes long, it will still continue the parameter.

Acutally you can leave col 72 blank.



Gerry
Back to top
View user's profile Send private message
Bill Dennis

Active Member


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

PostPosted: Mon Apr 20, 2009 7:35 pm
Reply with quote

As gerry said, code the JCL with PARM symbolics to satisfy the reader/interpreter (end in 71, 'X' in 72, continue in 16, etc.). The length of the symbolics after substitution doesn't matter as long as the total PARM ends up at 100 bytes or less.
Back to top
View user's profile Send private message
vikas kumar jain

New User


Joined: 02 Aug 2006
Posts: 9
Location: noida

PostPosted: Tue Apr 28, 2009 7:49 pm
Reply with quote

lots of thanks Dennis..it works...(no need of X in 72 column also)
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 Write line by line from two files DFSORT/ICETOOL 7
No new posts Reading dataset in Python - New Line ... All Other Mainframe Topics 22
No new posts rewrite same SAY line CLIST & REXX 8
No new posts Merge files with a key and insert a b... DFSORT/ICETOOL 6
No new posts Repeat a DD line- comment and insert ... CA Products 3
Search our Forums:

Back to Top