IBM MAINFRAME HELP & SUPPORT FORUMS
Technical Forums for IBM Mainframe Applications like COBOL, JCL, CICS, DB2, FileAid, DFSORT, Endevor, Xpediter, CoolGen, CA-7&11, AbendAid, IMS, IDMS, PL/I, MqSeries, SyncSort, Assembler, ChangeMan, Easytrieve, InterTest, REXX, CLIST etc...
 

Error in DFSORT with IF THEN

THIS IS AN ARCHIVE FORUM: CLICK HERE TO GO TO THE ORIGINAL TOPIC

 
       IBMMAINFRAMES.com - IBM Mainframe Support Forums Index -> DFSORT/ICETOOL
View previous topic :: View next topic  
Author Message
VIGNRSH



Joined: 18 Mar 2007
Posts: 30
Location: India

Posted: Wed Aug 06, 2008 11:11 am    Post subject: Error in DFSORT with IF THEN  

Hi ,

i am getting the folllowing error ,

Code: ICE143I 0 BLOCKSET     COPY  TECHNIQUE SELECTED                                 
ICE250I 0 VISIT http://www.ibm.com/storage/dfsort FOR DFSORT PAPERS, EXAMPLES AN
ICE000I 1 - CONTROL STATEMENTS FOR 5694-A01, Z/OS DFSORT V1R5 - 13:28 ON WED AUG
           SORT FIELDS=COPY                                                     
           OUTFIL FNAMES=FILE1,                                                 
           IFTHEN=(WHEN=(1,10,CH,EQ,C'CTRL1 : *.',AND,                         
                        113,15,CH,EQ,C'PAGE NO : PPPPP'),                       
            OVERLAY=(35:                                                       
             C' xxxxxxxxx - xxxxxx                                            M',-
              22X,SEQNUM,5,ZD,5X))                                               -
           OUTFIL FNAMES=FILE1,                                                 
           IFTHEN=(WHEN=(1,10,CH,EQ,C'AAAAAAAAAA',AND,                         
                                      $                                         
ICE007A 5 SYNTAX ERROR                                                         
                        34,65,CH,EQ,                                           
           C'BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB',
           AND,                                                                 
                        113,20,CH,CH,EQ,C'DATE    : DD/MM/YYYY'


Please help , on what is the problem....

Note from Mod: Post Edited
Back to top  
Aaru



Joined: 03 Jul 2007
Posts: 1148
Location: Mumbai - India

Posted: Wed Aug 06, 2008 11:29 am    Post subject: Reply to: help needed in IF THEN  

VIG,

Please use the code tag and post your code.
Back to top  
dick scherrer



Joined: 23 Nov 2006
Posts: 8733
Location: 221 B Baker St

Posted: Wed Aug 06, 2008 11:37 am    Post subject:  

Hello,

Please do not post screenshots - i noticed the /img in the initial post.

As Aaru mentioned, you should post your jcl and control statements using the "Code" tag at the top of the reply panel.
Back to top  
dbzTHEdinosauer



Joined: 20 Oct 2006
Posts: 1639
Location: germany

Posted: Wed Aug 06, 2008 12:03 pm    Post subject:  

this is the link for the bbcode used on this website:
http://ibmmainframes.com/faq.php?mode=bbcode
Back to top  
Frank Yaeger



Joined: 15 Feb 2005
Posts: 4613
Location: San Jose, CA

Posted: Wed Aug 06, 2008 10:10 pm    Post subject:  

I believe a dash (-) in column 72 indicating continuation is causing the problem.

You also have FNAMES=FILE1 twice and you're missing BUILD or OVERLAY for the second IFTHEN clause. Something like this will work:

Code:
 SORT FIELDS=COPY
 OUTFIL FNAMES=FILE1,
 IFTHEN=(WHEN=(1,10,CH,EQ,C'CTRL1 : *.',AND,
              113,15,CH,EQ,C'PAGE NO : PPPPP'),
  OVERLAY=(35:
   C' xxxxxxxxx - xxxxxx',44X,C'M',
    22X,SEQNUM,5,ZD,5X))
 OUTFIL FNAMES=FILE2,
 IFTHEN=(WHEN=(1,10,CH,EQ,C'AAAAAAAAAA',AND,
              34,65,CH,EQ,
 C'BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB',
 AND,
              113,20,CH,EQ,C'DATE    : DD/MM/YYYY'),
   OVERLAY=(...))
Back to top  
VIGNRSH



Joined: 18 Mar 2007
Posts: 30
Location: India

Posted: Thu Aug 07, 2008 12:45 pm    Post subject: Reply to: Error in DFSORT with IF THEN  

Hi , FranK this is the sort card iam using ...
When i removed the Continuation character it showed sysntax error at teh end of FIRST IF THEN ..Therefore i added..

Code:
 SORT FIELDS=COPY                                                       
 OUTFIL FNAMES=FILE1,                                                   
 IFTHEN=(WHEN=(1,10,CH,EQ,C'CTRL1 : *.',AND,                           
              113,15,CH,EQ,C'PAGE NO : PPPPP'),                         
  OVERLAY=(35:                                                         
   C' xxxxxxxxxxxxxxxxxxx                                            MU'
    22X,SEQNUM,5,ZD,5X))                                               -
 OUTFIL FNAMES=FILE1,                                                  -
 IFTHEN=(WHEN=(1,10,CH,EQ,C'AAAAAAAAAA',AND,                           -
              34,65,CH,EQ,                                             -
 C'BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB', -
 AND,                                                                   
              113,20,CH,CH,EQ,C'DATE    : DD/MM/YYYY')                 
  OVERLAY=(35:                                                         
   C' xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx                 '
    22X,&DATE)),                                                       
 IFTHEN=(WHEN=(1,11,CH,EQ,C'CTRL2 : *.*',AND,                           
              34,65,CH,EQ,65C'C',AND,                                   
              113,18,CH,CH,EQ,C'TIME    : HH:MM:SS'))                   
  OVERLAY=(35:                                                         
   C'                                                                  '
    22X,&TIME))                                                         
**************************** Bottom of Data ****************************



In the below sort card i removed the multiple OUTFILs , and it is showing the error in the Character comparison string which is perfect....

Code:
143I 0 BLOCKSET     COPY  TECHNIQUE SELECTED                                   
250I 0 VISIT http://www.ibm.com/storage/dfsort FOR DFSORT PAPERS, EXAMPLES AND M
000I 1 - CONTROL STATEMENTS FOR 5694-A01, Z/OS DFSORT V1R5 - 15:10 ON THU AUG 07
        SORT FIELDS=COPY                                                       
        OUTFIL FNAMES=FILE1,                                                   
        IFTHEN=(WHEN=(1,10,CH,EQ,C'CTRL1 : *.',AND,                             
                     113,15,CH,EQ,C'PAGE NO : PPPPP'),                         
         OVERLAY=(35:                                                           
          C' TIBANK N.A - TAIWAN                                            MU',
           22X,SEQNUM,5,ZD,5X)),                                              -
        IFTHEN=(WHEN=(1,10,CH,EQ,C'AAAAAAAAAA',AND,                           -
                                   $                                           
007A 5 SYNTAX ERROR                                                             
                     34,65,CH,EQ,                                             -
        C'BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB', -
        AND,                                                                   
                     113,20,CH,CH,EQ,C'DATE    : DD/MM/YYYY')                   
                     $                                                         
 .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .


How an i overcome this?
Back to top  
Frank Yaeger



Joined: 15 Feb 2005
Posts: 4613
Location: San Jose, CA

Posted: Thu Aug 07, 2008 10:29 pm    Post subject:  

I can't tell what columns any of your characters are in. When I try to recreate your control statements, I don't get the same messages you did. I need to know exactly what your control statements look like and I can't figure that out from posts on this board.

It looks to me like the apostrophe after MU is in column 72 indicating continuation rather then the end of the string, but I can't tell for sure. And in either case, you're missing a comma between MU' and 22X on the next line. In my previous post, I suggested using nX for n blanks instead of all of those blanks in the middle of the string so you won't have to go up to column 72, but you ignored that.

I still think you have nonblank characters in column 72 indicating continuation and if so, you need to fix that. I'd also suggest removing the dashes since they aren't needed and they could be causing problems.

If you want me to look at this further, you need to send me a note offline (yaeger@us.ibm.com) with your complete JCL and control statements in a plain text file, and the messages you received in another plain text file, so I can see what you're actually doing. Please put "DFSORT" somewhere in your Subject line to catch my attention.
Back to top  
 
       IBMMAINFRAMES.com - IBM Mainframe Support Forums Index -> DFSORT/ICETOOL
Page 1 of 1
THIS IS AN ARCIVE FORUM IN READ ONLY MODE. IF YOU WANT TO ASK YOUR DOUBTS USE THE ACTUAL FORUM