Obtain the first columns



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

Obtain the first columns

Postby samb01 » Fri Aug 05, 2011 1:57 pm

Hello,


i would like getting the 25 th first columns of a sortin data.

My sortout data is already existing and his LRECL is 117 (FB format).

The BIND doesn't work because my SORTOUT DATA has not a 25 LRECL...

Thanks for you help.
samb01
 
Posts: 431
Joined: Mon Nov 16, 2009 7:24 pm
Has thanked: 1 time
Been thanked: 0 time

Re: Obtain the first columns

Postby NicC » Fri Aug 05, 2011 2:26 pm

I do not really understand what you are saying/asking or trying to do. Columns are DB2 things - sort uses fields. What BIND does not work? You do not bind when sorting. Is this a sort or DB2 question?
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: Obtain the first columns

Postby samb01 » Fri Aug 05, 2011 5:24 pm

This is the sysin of the program SORT


//SYSIN DD *                         
  SORT FIELDS=COPY                     
  OUTFIL FNAMES=SORTOUT,BUILD=(1,50)   




Sorry, it's not BIND but BUILD :oops:

It doesn't work because the sortout dataset has an LRECL too long...
samb01
 
Posts: 431
Joined: Mon Nov 16, 2009 7:24 pm
Has thanked: 1 time
Been thanked: 0 time

Re: Obtain the first columns

Postby NicC » Fri Aug 05, 2011 8:53 pm

what is wrong with just creating a new dataset? And omit the DCB values - DFSORT will handle those.
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: Obtain the first columns

Postby Frank Yaeger » Fri Aug 05, 2011 10:52 pm

samb01,

The SORTOUT LRECL must MATCH the reformatted BUILD length. If you want output LRECL=117, you must pad the reformatted records to 117 bytes, e.g. to pad with blanks use:

   OUTFIL FNAMES=SORTOUT,BUILD=(1,50,117:X)   


i would like getting the 25 th first columns of a sortin data.


Then why are you using 50 instead of 25?
Frank Yaeger - DFSORT Development Team (IBM) - yaeger@us.ibm.com
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort
User avatar
Frank Yaeger
Global moderator
 
Posts: 1079
Joined: Sat Jun 09, 2007 8:44 pm
Has thanked: 0 time
Been thanked: 15 times

Re: Obtain the first columns

Postby Frank Yaeger » Fri Aug 05, 2011 10:54 pm

what is wrong with just creating a new dataset? And omit the DCB values - DFSORT will handle those.


That will work if he wants SORTOUT LRECL=50, but not if he wants SORTOUT LRECL=117.
Frank Yaeger - DFSORT Development Team (IBM) - yaeger@us.ibm.com
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort
User avatar
Frank Yaeger
Global moderator
 
Posts: 1079
Joined: Sat Jun 09, 2007 8:44 pm
Has thanked: 0 time
Been thanked: 15 times

Re: Obtain the first columns

Postby samb01 » Tue Aug 09, 2011 1:30 pm

Frank Yaeger wrote:samb01,

The SORTOUT LRECL must MATCH the reformatted BUILD length. If you want output LRECL=117, you must pad the reformatted records to 117 bytes, e.g. to pad with blanks use:

   OUTFIL FNAMES=SORTOUT,BUILD=(1,50,117:X)   


i would like getting the 25 th first columns of a sortin data.


Then why are you using 50 instead of 25?


Thanks a lot Frank Yaeger,

it is what i want. The number 25 is a mistake... I want the 50 th fisrt columns.
samb01
 
Posts: 431
Joined: Mon Nov 16, 2009 7:24 pm
Has thanked: 1 time
Been thanked: 0 time


Return to DFSORT/ICETOOL/ICEGENER

 


  • Related topics
    Replies
    Views
    Last post