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

Jcl to create a jcl and receiving a syntax error


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

New User


Joined: 12 Oct 2005
Posts: 1
Location: The land of OZ

PostPosted: Wed Oct 12, 2005 9:12 pm
Reply with quote

I am a self taught JCL writter and need a bit of assistance. I am using a jcl to create a jcl and receiving a syntax error because my statement is too long.
OPTION COPY
INCLUDE COND=(1,7,ZD,EQ,2999999,&,29,5,ZD,EQ,99999,&,10,6,CH,NE,C'999999',OR,
1,7,ZD,EQ,1010742,&,29,5,ZD,EQ,01848,&,10,6,CH,NE,C'000618',OR,
$
This work if I manually wrap the condition it will work:
INCLUDE COND=(1,7,ZD,EQ,2999999,&,29,5,ZD,EQ,99999,&,10,6,CH,
NE,C'999999',OR,
1,7,ZD,EQ,1010742,&,29,5,ZD,EQ,01848,&,10,6,CH,
NE,C'000618')

What can I add to my jcl to automatically wrap the line? OR How can I get this to work?

Thank you in advance for your expert advise!!!
[/right]
Back to top
View user's profile Send private message
Kevin

Active User


Joined: 25 Aug 2005
Posts: 234

PostPosted: Wed Oct 12, 2005 9:35 pm
Reply with quote

You can break the string with a dash (-) in column 73.

Code:

   OPTION COPY
   INCLUDE COND=(1,7,ZD,EQ,2999999,&,29,5,ZD,EQ,99999,&,10,6,CH,NE,C'9999-
  99',OR,1,7,ZD,EQ,1010742,&,29,5,ZD,EQ,01848,&,10,6,CH,NE,C'000618')
Back to top
View user's profile Send private message
MGIndaco

Active User


Joined: 10 Mar 2005
Posts: 432
Location: Milan, Italy

PostPosted: Wed Oct 12, 2005 9:36 pm
Reply with quote

I'm not sure about your question but the $ from the sort say that an error is found at that position.

This is the link to DfSort that explain how to have a continuation:
http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/handheld/Connected/BOOKS/ICE1CG10/2.1.1.2?SHELF=ICE1SH10&DT=20050223112358

DfSort statement start at column 2 and end at column 71.

I hope in this help.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Wed Oct 12, 2005 11:15 pm
Reply with quote

Quote:
receiving a syntax error because my statement is too long...What can I add to my jcl to automatically wrap the line? OR How can I get this to work?



Your statement isn't too long - it's just not properly written. The DFSORT continuation rules do not allow a statement to go beyond column 71.

There are several ways to correctly continue a statement. The simplest way is to break after a comma, e.g.

Code:

  INCLUDE COND=(1,7,ZD,EQ,2999999,&,29,5,ZD,EQ,99999,&,
    10,6,CH,NE,C'999999',OR,1,7,ZD,EQ,1010742,&,29,5,ZD,EQ,01848,&,
    10,6,CH,NE,C'000618',OR,
    ...


You can also run the statement up to column 71, put a nonblank (e.g. *) in 72, and start the next statement in column 2.
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 PARSE Syntax for not fix length word ... JCL & VSAM 7
No new posts Error to read log with rexx CLIST & REXX 11
No new posts Error when install DB2 DB2 2
No new posts CLIST - Virtual storage allocation error CLIST & REXX 5
No new posts How to create a list of SAR jobs with... CA Products 3
Search our Forums:

Back to Top