DFSORT help



IBM's flagship sort product DFSORT for sorting, merging, copying, data manipulation and reporting. Includes ICETOOL and ICEGENER

DFSORT help

Postby cmarta001 » Fri Jul 03, 2020 6:23 pm

Hi, I am trying to use DFSORT (Type SFF) to remove spaces from the following file and get RC=16 Syntax error. Can somebody please help.

Here's the file:

Command ===>                                                  Scroll ===> CSR  
****** ***************************** Top of Data ******************************
=COLS> ----+----1----+----2----+----3----+----4----+----5----+----6----+----7--
000001 EN 706 43 L 02 014 1616 0000 000000               0.00        -331,824.8
000002 EN 706 43 L 02 018 0100 0054 000000    -253,180,404.57     -75,184,444.7
000003 EN 706 43 L 02 100 0100 0735 000000     132,603,505.15     137,821,581.8
 

Here's my UTILOPC:

   SORT FIELDS=COPY                          
                                             
 OUTREC FIELDS=(01,35,CH,                    
                37,18,SFF,TO=PD,LENGTH=8,    
                56,18,SFF,TO=PD,LENGTH=8,    
                75,18,SFF,TO=PD,LENGTH=8,    
                94,18,SFF,TO=PD,LENGTH=8);    
 

Here's the SYNTAX ERROR:

E SYNTAX ERROR                                                        
                  H=8,75,18,SFF,TO=PD,LENGTH=8,94,18,SFF,TO=PD,LENGTH=8)
 0 C5-I58435 C6-BASE   C7-I58435 C8-I58435 E7-I58377                    
 

Thanks
Coded for you - next time do it yourself
cmarta001
 
Posts: 2
Joined: Fri Jul 03, 2020 6:07 pm
Has thanked: 0 time
Been thanked: 0 time

Re: DFSORT help

Postby NicC » Fri Jul 03, 2020 7:55 pm

It's not a file it's a dataset.
Please present code within code tags
Please present all the sort messages including the message id
I suspect you are missing a load of parentheses.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times

Re: DFSORT help

Postby cmarta001 » Fri Jul 03, 2020 8:08 pm

Thanks Nic. I've never did DFSORT SFF before, I don't understand what you're asking...

This is all I have, the goal is to remove spaced between each field:

SORT FIELDS=COPY

OUTREC FIELDS=(01,35,CH,
37,18,SFF,TO=PD,LENGTH=8,
56,18,SFF,TO=PD,LENGTH=8,
75,18,SFF,TO=PD,LENGTH=8,
94,18,SFF,TO=PD,LENGTH=8);
cmarta001
 
Posts: 2
Joined: Fri Jul 03, 2020 6:07 pm
Has thanked: 0 time
Been thanked: 0 time

Re: DFSORT help

Postby NicC » Sat Jul 04, 2020 1:17 pm

You still have not presented the DFSORT output messages which should be with1n code tags to preserve alignment as should your code. Use the full editor if the relevant buttons are not visible.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times

Re: DFSORT help

Postby sergeyken » Tue Jul 07, 2020 7:10 pm

SORT utilities do not use ';' as statement separator.

It is garbage - causing the syntax error.
Javas and Pythons come and go, but JCL and SORT stay forever.
User avatar
sergeyken
 
Posts: 425
Joined: Wed Jul 24, 2019 10:12 pm
Has thanked: 7 times
Been thanked: 40 times

Re: DFSORT help

Postby knv09 » Tue Jul 21, 2020 7:13 pm

Hi cmarta001,
Well, if you want just to "remove spaced" (I have interpreted it as "remove SPACES"), you do not need to deal with SFF :-)
There's a simple option in DFSORT called FINDREP: Find something and Replace it with something else (please see below);
in your case it would be Find space --> Replace with nothing
Your resulting data should not contain any spaces (if that's what you have REALLY stated as your goal)
And I suggest you to take a look as for how to use Code tags - very-very simple as well :-)
Best of luck.


//NOSPACE  EXEC PGM=ICEMAN
//SORTIN   DD *
000001 EN 706 43 L 02 014 1616 0000 000000               0.00        -33
000002 EN 706 43 L 02 018 0100 0054 000000    -253,180,404.57     -75,18
000003 EN 706 43 L 02 100 0100 0735 000000     132,603,505.15     137,82
//SORTOUT  DD SYSOUT=*
//SYSIN    DD *
  SORT FIELDS=COPY
  INREC FINDREP=(IN=C' ',OUT=C'')
  END
/*
//
 
Thanks,
knv09
knv09
 
Posts: 2
Joined: Fri Mar 04, 2011 5:09 pm
Location: Montreal, Canada
Has thanked: 0 time
Been thanked: 0 time


Return to DFSORT/ICETOOL/ICEGENER

 


  • Related topics
    Replies
    Views
    Last post