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

U0007 abend in Sort card


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
nagarajan.dharani

New User


Joined: 27 Dec 2006
Posts: 36
Location: Chennai

PostPosted: Tue Mar 18, 2008 2:15 pm
Reply with quote

Hi,

Could anyone help me in solving the syntax error for the below
sort jcl

Code:

//STEP005  EXEC PGM=SORT
//SYSIN    DD  *
    SORT FIELDS=COPY
    OUTREC FIELDS=(1,4,BI,TO=ZD,LENGTH=10,
                   16,1,
                   37,1,
                   50,45,TRAN=LTOU,
                   SQZ=(SHIFT=LEFT,PREBLANK=C'.,'),
                   3X)
/*
//SYSOUT   DD SYSOUT=*
//SORTIN   DD DSN=INFILE,DISP=SHR
//SORTOUT  DD DISP=(,CATLG,DELETE),
//             UNIT=DISK,
//             SPACE=(CYL,(10000,10000),RLSE),
//             DSN=OUTFILE


I am getting the following error

,, OUTREC FIELDS=(1,4,BI,TO=ZD,LENGTH=10,
16,1,
37,1,
50,45,TRAN=LTOU,
SQZ=(SHIFT=LEFT,PREBLANK=C'.,'),
$
ICE007A E SYNTAX ERROR
3X)
$
ICE007A 0 SYNTAX ERROR
ICE751I 0 C5-K26318 C6-K90007 C7-K90000 C8-K23476 E7-K24705

Thanks,
Dharani
Back to top
View user's profile Send private message
rajatbagga

Active User


Joined: 11 Mar 2007
Posts: 199
Location: india

PostPosted: Tue Mar 18, 2008 6:16 pm
Reply with quote

Hi,

I see , the syntax of SQZ is (p,m,SQZ) where 'p' is the postion and 'm' is lenght of data you want to perform SQZ funtion...

For eg. in your OUTREC below:

Code:
OUTREC FIELDS=(1,4,BI,TO=ZD,LENGTH=10,
                   16,1,
                   37,1,
                   50,45,TRAN=LTOU,p,m,
                   SQZ=(SHIFT=LEFT,PREBLANK=C'.,'),
                   3X)


please correct me if i am wrong...
Back to top
View user's profile Send private message
nagarajan.dharani

New User


Joined: 27 Dec 2006
Posts: 36
Location: Chennai

PostPosted: Tue Mar 18, 2008 7:03 pm
Reply with quote

Hi rajat,

Thanks for your reply

The p,m what you are specifying is 50,45

If I use the TRAN=LTOU seperately without SQZ it works. Similarly if I use SQZ without TRAN=LTOU it works.

Both the SQZ and TRAN functions are required for the field in 50,45.
But when both the funtions are specified I get a syntax error.

Thanks,
Dharani
Back to top
View user's profile Send private message
rajatbagga

Active User


Joined: 11 Mar 2007
Posts: 199
Location: india

PostPosted: Tue Mar 18, 2008 7:19 pm
Reply with quote

Hi nagarajan.dharani,

I still feel that you cannot use TRAN=LTOU and SQZ both at some time on same fileds. I think you either have to suppy 50.45 for SQZ also or you can use OVERLAY function after your OUTREC statement for applying SQZ on 50,45.

I hope i am clear...
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: Tue Mar 18, 2008 9:36 pm
Reply with quote

Dharani,

rajatbagga is right. The syntax error is issued because you don't have p,m,SQZ=(...). If you want to use TRAN=LTOU on 50,45 and then use SQZ on the result in 50,45, you can do it with DFSORT control statements like this:

Code:

    SORT FIELDS=COPY                                     
    OUTREC IFTHEN=(WHEN=INIT,                             
      BUILD=(1,4,BI,TO=ZD,LENGTH=10,                     
             16,1,                                       
             37,1,                                       
             50,45,TRAN=LTOU,                             
             3X)),                                       
     IFTHEN=(WHEN=INIT,                                   
        OVERLAY=(50,45,SQZ=(SHIFT=LEFT,PREBLANK=C'.,'))) 
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 Need to set RC4 through JCL SORT DFSORT/ICETOOL 5
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts JCL sort card - get first day and las... JCL & VSAM 9
No new posts ISAM and abend S03B JCL & VSAM 10
No new posts Sort First/last record of a subset th... DFSORT/ICETOOL 7
Search our Forums:

Back to Top