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

How to avoid typing the key field repeatedly in include cond


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Ambili S

Active User


Joined: 06 Sep 2007
Posts: 112
Location: India

PostPosted: Mon Sep 10, 2007 10:00 am
Reply with quote

INREC BUILD=(C'C1,''',50C'A',C'''',80:X) .
Why are there 3 single quotes after C1 and 4 quotes after 50C'A'. What do they represent .When using C'string' you need two apostrophes for each apostrophe in the string.
C'C1,''' = C1,'
50C'A' = A...A
C'''' = '
So the string is C1,'A...A' - this creates a symbol named C1 for A...A (50 A's).

Frank i am not clear on this syntax (C'C1,''',50C'A',C'''',80:X).
C'''' that appears in INREC is explained as 1 apostrophe(') in your explanation given above. My doubt is , why is it written as ,C'''', and why not as ,'''', because in C1,' the apostrophe after C1, is represented as ''' not as C'''. On submitting the JCL with '''' it throws syntax error .
, but it works fine with C'''' . Please explain why is it so.
Could you please throw more light on this.
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: Mon Sep 10, 2007 8:30 pm
Reply with quote

C'string' defines a constant string constant. The string must be preceded by C' and followed by '. To define an apostrophe in a string, you must use two apostrophes.

C'''' is C'string' where string is '' (an apostrophe represented by two apostrophes). '''' is invalid because it is not preceded by C.

C'C1,''' is C'string' where string is C1,'' (C1, and an apostrophe represented by two apostrophes).

I don't know how to explain it better than that.

If the apostrophe characters confuse you, then perhaps this equivalent version of the INREC statement using X'7D' for the apostrophe will be easier to understand:

Code:

   INREC BUILD=(C'C1,',X'7D',50C'A',X'7D',80:X)   
Back to top
View user's profile Send private message
Ambili S

Active User


Joined: 06 Sep 2007
Posts: 112
Location: India

PostPosted: Tue Sep 11, 2007 11:32 am
Reply with quote

Hi Frank
The explanation you gave helped me to understand the syntax well.
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 -> DFSORT/ICETOOL

 


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 How to avoid duplicating a CICS Web S... CICS 0
No new posts Join 2 files according to one key field. JCL & VSAM 3
No new posts How to move the first field of each r... DFSORT/ICETOOL 5
Search our Forums:

Back to Top