Page 1 of 1

Updating a dataset

PostPosted: Fri Feb 10, 2012 7:52 pm
by samb01
Hello,

i have this dataset

********************************* Top of Data ****
CXRT.SVE.A0407008                       
CXRT.SVE.A0406894                       
CXRT.SVE.A0406943                       
CXRT.SVE.A0406901                       
CXRT.SVE.A0423252     
******************************* Bottom of Data ********************


and i want getting this dataset (a sysin of ADRDSSU)

********************************* Top of Data ******
 INCLUDE(   -                                       
   CXRT.SVE.A8038029                   - 
   CXRT.SVE.A8038003                   - 
   CXRT.SVE.A8037998                   - 
   CXRT.SVE.A8037980                   - 
   CXRT.SVE.A8037972                   - 
    )                                                               
******************************** Bottom of Data *******************



Is it possible with DFSORT ?

Thank's for your help.

Re: Updating a dataset

PostPosted: Fri Feb 10, 2012 11:39 pm
by Frank Yaeger
You can use a DFSORT job like the following to do what you asked for:

//S1 EXEC PGM=SORT                               
//SYSOUT DD SYSOUT=*                             
//SORTIN DD *                                     
CXRT.SVE.A0407008                                 
CXRT.SVE.A0406894                                 
CXRT.SVE.A0406943                                 
CXRT.SVE.A0406901                                 
CXRT.SVE.A0423252                                 
//SORTOUT DD SYSOUT=*                             
//SYSIN DD *                                     
  OPTION COPY                                     
  OUTFIL REMOVECC,HEADER1=(' INCLUDE(   -'),     
    BUILD=(4:1,20,40:C'-',80:X),                 
    TRAILER1=(5:')')
/*                             

Re: Updating a dataset

PostPosted: Mon Feb 13, 2012 9:29 pm
by samb01
Hello Frank Yaeger .
Thank's but it dosn't work...

Have a look :


 INCLUDE(   -                           
   CXRT.SVE.A                -
   CXRT.SVE.A                -
   CXRT.SVE.A                -
   CXRT.SVE.A                -
   CXRT.SVE.A                -
     )                                             



Re: Updating a dataset

PostPosted: Mon Feb 13, 2012 9:39 pm
by enrico-sorichetti
are You sure that You are using exactly the same sort control statements as provided ?

Re: Updating a dataset

PostPosted: Mon Feb 13, 2012 9:40 pm
by samb01
Hello,

i found the error,

it works with tha sysin

//SYSIN  DD    *                               
 OPTION COPY                                   
 OUTFIL REMOVECC,HEADER1=(' INCLUDE(   -'),     
   BUILD=(4:1,48,58:C'-',80:X),                 
   TRAILER1=(5:')')                             
//*                                             



Thanks a lot.

Re: Updating a dataset

PostPosted: Mon Feb 13, 2012 9:40 pm
by skolusu
samb01 wrote:Hello Frank Yaeger .
Thank's but it dosn't work...


A simple " it doesn't work" will not help to solve the problem. Frank's job works fine with the sample data you provided . Frank's job will pick the names from position 1 for a length of 20 bytes . Looks like your names does not start in pos 1 or length exceeds 20 bytes. So Show us your complete sysout along with a sample of input file.

Re: Updating a dataset

PostPosted: Mon Feb 13, 2012 9:46 pm
by samb01
Ok, sorry, i have some datasets whose the lenght is longer than 20....
So, in the new sysin, i consider the dataset'sname could reach 44 bytes...