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

String Continuation 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
shanth555

New User


Joined: 17 Aug 2012
Posts: 35
Location: India

PostPosted: Mon May 26, 2014 5:28 pm
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: 1788
Location: Bloomington, IL

PostPosted: Mon May 26, 2014 5:31 pm
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

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Mon May 26, 2014 5:37 pm
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: 202
Location: Toronto, ON, Canada

PostPosted: Tue May 27, 2014 10:39 pm
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
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

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Wed May 28, 2014 11:27 am
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

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Wed May 28, 2014 12:07 pm
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: 2481
Location: @my desk

PostPosted: Wed May 28, 2014 5:24 pm
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

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Wed May 28, 2014 5:56 pm
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. View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts PARSE Syntax for not fix length word ... JCL & VSAM 7
No new posts Sortjoin and Search for a String and ... DFSORT/ICETOOL 1
No new posts file manager is doing string conversion IBM Tools 3
No new posts Search string in job at regular Spool... CLIST & REXX 0
Search our Forums:

Back to Top