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 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: 1521
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: 1521
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: 1521
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 Split 1 file into 10 output Files - S... Prasanth Kumar SYNCSORT 5 Sat Sep 16, 2017 12:02 am
No new posts BUILD OUTFIL based on condition other... balaji81_k DFSORT/ICETOOL 13 Fri Sep 08, 2017 11:06 pm
No new posts Hardcoded negative sign value in output scdinesh SYNCSORT 8 Fri Sep 08, 2017 5:28 am
No new posts SORT Trailer Count - LRECL Output co... amorante DFSORT/ICETOOL 5 Tue Aug 29, 2017 8:57 pm
No new posts WER268A OUTREC STATEMENT : SYNTAX E... frozenblood87 SYNCSORT 12 Sat Aug 26, 2017 9:45 pm

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