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
 

 

Generating Quotes in BUILD statement output.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1491
Location: Chennai

PostPosted: Tue Oct 27, 2009 10:40 pm    Post subject: Generating Quotes in BUILD statement output.
Reply with quote

Hi,

Could you please suggest a solution.
I have a DFSORT step that generates a DFSORT control statements for subsequent DFSORT step.
The below step reads the date followed by record type '0'.(only 1 type '0' record is found)
Subtracts 100 from it and puts it in the sort card output.

Eg: Input file:

Code:
0200908


Output file:

Code:
    INCLUDE COND=((1,1,ZD,EQ,2,AND,23,6,ZD,GE,200807),
         OR,1,1,ZD,EQ,0,OR,1,1,ZD,EQ,9)



DFSORT job:

Code:
//S1       EXEC  PGM=ICETOOL                                     
//TOOLMSG  DD SYSOUT=*                                           
//DFSMSG   DD SYSOUT=*                                           
//IN1      DD DSN=XW62.SDG76S01,DISP=SHR                         
//TEMP1    DD DSN=&&TEMP1,UNIT=TEMP,SPACE=(TRK,(1,1),RLSE),     
//         DCB=(RECFM=FB,LRECL=80,BLKSIZE=0),DISP=(NEW,PASS)     
//TOOLIN   DD *                                                 
 COPY FROM(IN1) TO(TEMP1) USING(CTL1)                           
/*                                                               
//CTL1CNTL DD *                                                 
  INCLUDE COND=(1,1,CH,EQ,C'0')                                 
  INREC IFOUTLEN=80,IFTHEN=(WHEN=(1,1,CH,EQ,C'0'),               
  BUILD=(5:C'INCLUDE COND=((1,1,ZD,EQ,2,AND,23,6,ZD,GE,',       
                          2,6,ZD,SUB,+100,M11,LENGTH=6,C'),'))   
  OUTFIL REMOVECC,                                               
  TRAILER1=(C'         OR,1,1,ZD,EQ,0,OR,1,1,ZD,EQ,9)')         
/*                                                               


When we try to generate
Code:

    INCLUDE COND=((1,1,CH,EQ,C'2',AND,23,6,ZD,GE,200807),
         OR,1,1,CH,EQ,C'0',OR,1,1,CH,EQ,C'9')


I get an error with misplaced quotes.
Could you please let me know how we can use multiple quotes inside a build statement.

P.S. - I am unable to use REXX since the file is huge. Ty for ur patience in reading this long post icon_biggrin.gif .

Thanks in advance,
Back to top
View user's profile Send private message

Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Tue Oct 27, 2009 11:29 pm    Post subject: Reply to: Generating Quotes in BUILD statement output.
Reply with quote

vasanthz,

Use the following DFSORT/ICETOOL JCl

Code:

//STEP0100 EXEC PGM=ICETOOL                                   
//TOOLMSG  DD SYSOUT=*                                       
//DFSMSG   DD SYSOUT=*                                       
//IN1      DD DSN=XW62.SDG76S01,DISP=SHR
//TEMP1    DD DSN=&&TEMP1,DISP=(,PASS),SPACE=(TRK,(1,0),RLSE)
//TOOLIN   DD *                                               
  COPY FROM(IN1) USING(CTL1)                                 
//CTL1CNTL DD *                                               
  INCLUDE COND=(1,1,CH,EQ,C'0')                               
  OUTFIL FNAMES=TEMP1,                                       
  BUILD=(3:C'INCLUDE COND=((',                               
           C'1,1,ZD,EQ,2,AND,23,6,ZD,GE,',                   
           2,6,ZD,SUB,+100,M11,LENGTH=6,C'),OR,'/,           
        18:C'1,1,ZD,EQ,0,OR,1,1,ZD,EQ,9)',80:X)               
//*
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1491
Location: Chennai

PostPosted: Wed Oct 28, 2009 12:11 am    Post subject:
Reply with quote

Hi Kolusu,

Thanks for your time in replying.
I might not have been clear with the requirement, I need to generate

Code:
    INCLUDE COND=((1,1,CH,EQ,C'2',AND,23,6,ZD,GE,200807),
         OR,1,1,CH,EQ,C'0',OR,1,1,CH,EQ,C'9')



In the segment
Quote:
CH,EQ,C'2'.

When we try to specify this ' between C & 2 I get the error.


I will try to capture that error tomorrow when im at workplace.

Thanks & Regards,
Back to top
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Wed Oct 28, 2009 12:29 am    Post subject: Reply to: Generating Quotes in BUILD statement output.
Reply with quote

vasanthz,

change your CTL1CNTL to the following

Code:

//CTL1CNTL DD *                                         
  INCLUDE COND=(1,1,CH,EQ,C'0')                         
  OUTFIL FNAMES=TEMP1,                                   
  BUILD=(3:C'INCLUDE COND=((',                           
           C'1,1,CH,EQ,C''',C'2''',C',AND,23,6,ZD,GE,', 
           2,6,ZD,SUB,+100,M11,LENGTH=6,C'),OR,'/,       
        18:C'1,1,CH,EQ,C''',C'0''',                     
           C',OR,1,1,CH,EQ,C''',C'9''',C')',80:X)       
//*                                                     


This will generate

Code:

  INCLUDE COND=((1,1,CH,EQ,C'2',AND,23,6,ZD,GE,200808),OR,
                 1,1,CH,EQ,C'0',OR,1,1,CH,EQ,C'9')         
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1491
Location: Chennai

PostPosted: Wed Oct 28, 2009 1:03 am    Post subject:
Reply with quote

Thanks again,

I try this and let you know.

Regards,
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Translating Quotes Khadhar Basha CLIST & REXX 6 Tue May 09, 2017 11:52 am
No new posts find RACF group for access to spooled... jzhardy JCL & VSAM 1 Mon May 08, 2017 11:46 am
No new posts Strings with double quotes having pro... raja Arumugam All Other Mainframe Topics 11 Thu Mar 30, 2017 10:34 am
No new posts Problem reading GTF trace output danik56 ABENDS & Debugging 7 Thu Mar 16, 2017 1:02 pm
No new posts SORT VSAM file with each field one by... maxsubrat DFSORT/ICETOOL 6 Tue Mar 14, 2017 1:07 pm


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