Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

String Continuation in JCL

 
Post new topic   This topic is locked: you cannot edit posts or make replies.    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
shanth555

New User


Joined: 17 Aug 2012
Posts: 35
Location: India

PostPosted: Mon May 26, 2014 5:28 pm    Post subject: String Continuation in JCL
Reply with quote

How to make String continuation in JCL for 3 or more lines.

Code:

IFTHEN=(WHEN=(43,7,CH,EQ,C'LATERSP'),                       
OVERLAY(67:C'THE GETCMX PROGRAM IS CHECKING TO SEE IF THE   X
     RESPONSE IS WITHIN THE TIMEOUT PARAMETER  IF IT ISNT   X
     THEN IT IS LOGGED AS A LATERSP.')),                   


The above piece of code gives Max 16.
Back to top
View user's profile Send private message

Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1738
Location: Bloomington, IL

PostPosted: Mon May 26, 2014 5:31 pm    Post subject:
Reply with quote

How to recognize JCL (hint: that's not JCL, no matter what some ignorant instructor told you).
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7223

PostPosted: Mon May 26, 2014 5:37 pm    Post subject: Reply to: String Continuation in JCL
Reply with quote

Code:
OVERLAY=(67:C'THE GETCMX PROGRAM IS CHECKING ',
           C'TO SEE IF THE ',
           C'RESPONSE IS WITHIN THE TIMEOUT ',
           C'PARAMETER ',
           C'THEN IT IS LOGGED AS A LATERSP.'))


Although it is possible to contrinue SORT Control Cards, why make a rod for anyone's back by doing so? Just use multiple literal constants.
Back to top
View user's profile Send private message
jerryte

Active User


Joined: 29 Oct 2010
Posts: 183
Location: Toronto, ON, Canada

PostPosted: Tue May 27, 2014 10:39 pm    Post subject:
Reply with quote

What you have shown are control statements for a SORT utility. Bill's suggestion to use mutiple literals is the best way to go.

It is possible to continue a statement by putting a nonblank character in column 72 and then continuing on the next line starting at column 16. The DFSORT manual chapter 3 "General Coding Rules" describes this.
Back to top
View user's profile Send private message
shanth555

New User


Joined: 17 Aug 2012
Posts: 35
Location: India

PostPosted: Wed May 28, 2014 9:48 am    Post subject:
Reply with quote

Hi Jerryte,

The DFSORT rules is working when there are two lines.

i.e : in first line i coded till 71 and 'X' 72 & continued the on the next line starting on 16 column.

When 3 line continuation required - I tried the same by giving 'X' at 72 column of 2nd row & continued the on the next line starting on 16 column.

But it gave RC-0016. Continuation syntax error.
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7223

PostPosted: Wed May 28, 2014 11:27 am    Post subject: Reply to: String Continuation in JCL
Reply with quote

You have two choices. You can use a trailing comma to indicate a continuation, which is flexible, understandable, and works exactly like your existing control cards. Or you can take the stupid route and waste your time.

To some extent it is your choice. On the other hand, someone is paying for your time, and should not be happy if they were to discover what you were spending it on.

"What did you do yesterday?"

"I was trying to get a continuation to work"

"What else?"

"Well, nothing much, it is very difficult. It will make the code more difficult to maintain, so I need to get it right. There is an easy way, but that is too simple for a professional".

Topic locked.
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7223

PostPosted: Wed May 28, 2014 12:07 pm    Post subject: Reply to: String Continuation in JCL
Reply with quote

DFSORT multi-line continuation.
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2158
Location: @my desk

PostPosted: Wed May 28, 2014 5:24 pm    Post subject:
Reply with quote

Syncsort manual wrote:
If the control statement does contain a literal string that would extend beyond column 71, place a continuation character in column 72 and begin the continuation of the literal string in column 16 of the next card image.

Example:
Code:
             COL.16                                       COL.72
               ↓                                            ↓
   OUTFIL OUTREC=(1:10,8,30:40,10),HEADER2=(1:'CUSTOMER NUMBX
               ER',30:'ITEM NUMBER')
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7223

PostPosted: Wed May 28, 2014 5:56 pm    Post subject: Reply to: String Continuation in JCL
Reply with quote

Code:
   OUTFIL BUILD=(10,8,
                 30:40,10),
          HEADER2=(01:'CUSTOMER NUMBER',
                   30:'ITEM NUMBER')


Now you can change 10 to 9 without having to re-arrange.
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.    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. Checking wether a string starts from ... sundaram.naveen CLIST & REXX 9 Thu Oct 06, 2016 11:56 am
No new posts Random Password (in string format) ge... ezhavendhan COBOL Programming 10 Mon Aug 29, 2016 3:18 pm
No new posts How to insert a lengthy string havin... vidyaa DB2 7 Thu Aug 25, 2016 5:20 pm
No new posts Continuation Character ballaswaroop SYNCSORT 8 Thu Aug 25, 2016 4:46 pm
No new posts Which function does the Ampersand (&a... Andi1982 PL/I & Assembler 3 Wed Aug 24, 2016 2:05 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us