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

Error in DFSORT with IF THEN


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
VIGNRSH
Warnings : 1

New User


Joined: 18 Mar 2007
Posts: 44
Location: New Jersey,USA

PostPosted: Wed Aug 06, 2008 11:11 am
Reply with quote

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
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1287
Location: Chennai, India

PostPosted: Wed Aug 06, 2008 11:29 am
Reply with quote

VIG,

Please use the code tag and post your code.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Wed Aug 06, 2008 11:37 am
Reply with quote

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
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Wed Aug 06, 2008 12:03 pm
Reply with quote

this is the link for the bbcode used on this website:
ibmmainframes.com/faq.php?mode=bbcode
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: Wed Aug 06, 2008 10:10 pm
Reply with quote

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
View user's profile Send private message
VIGNRSH
Warnings : 1

New User


Joined: 18 Mar 2007
Posts: 44
Location: New Jersey,USA

PostPosted: Thu Aug 07, 2008 12:45 pm
Reply with quote

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
View user's profile Send private message
Frank Yaeger

DFSORT Developer


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

PostPosted: Thu Aug 07, 2008 10:29 pm
Reply with quote

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
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 Error to read log with rexx CLIST & REXX 11
No new posts Error when install DB2 DB2 2
No new posts Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts CLIST - Virtual storage allocation error CLIST & REXX 5
Search our Forums:

Back to Top