Page 1 of 1

SYNCSORT - Extracting the fields from DSN

PostPosted: Wed Dec 17, 2008 12:25 pm
by Naveen@Uppi
I have a dataset which is of VB format, 39 fields and the fields being separated by semicolon. I want to extract 37th field of all the records to a file. There are around 300,000 records in the file.

Thanks and regards,
Naveen N

Re: Extracting the fields from DSN

PostPosted: Wed Dec 17, 2008 10:26 pm
by Frank Yaeger
You can use DFSORT's PARSE function to do that. You didn't show what the input records look like or what the output records look like, so I just set up the job to extract the 37th delimited value right justified in a 20 character VB output field. If you want something else, give me details about what you want and show an example.

//S1    EXEC  PGM=ICEMAN                                             
//SYSOUT    DD  SYSOUT=*                                             
//SORTIN DD DSN=...  input file                     
//SORTOUT DD DSN=...  output file                                       
//SYSIN    DD    *                                                   
  OPTION COPY                                                         
  INREC PARSE=(%=(ENDBEFR=C';'),%=(ENDBEFR=C';'),%=(ENDBEFR=C';'),   
   %=(ENDBEFR=C';'),%=(ENDBEFR=C';'),%=(ENDBEFR=C';'),               
   %=(ENDBEFR=C';'),%=(ENDBEFR=C';'),%=(ENDBEFR=C';'),               
   %=(ENDBEFR=C';'),%=(ENDBEFR=C';'),%=(ENDBEFR=C';'),               
   %=(ENDBEFR=C';'),%=(ENDBEFR=C';'),%=(ENDBEFR=C';'),               
   %=(ENDBEFR=C';'),%=(ENDBEFR=C';'),%=(ENDBEFR=C';'),               
   %=(ENDBEFR=C';'),%=(ENDBEFR=C';'),%=(ENDBEFR=C';'),               
   %=(ENDBEFR=C';'),%=(ENDBEFR=C';'),%=(ENDBEFR=C';'),               
   %=(ENDBEFR=C';'),%=(ENDBEFR=C';'),%=(ENDBEFR=C';'),               
   %=(ENDBEFR=C';'),%=(ENDBEFR=C';'),%=(ENDBEFR=C';'),               
   %=(ENDBEFR=C';'),%=(ENDBEFR=C';'),%=(ENDBEFR=C';'),               
   %=(ENDBEFR=C';'),%=(ENDBEFR=C';'),%=(ENDBEFR=C';'),               
   %37=(ENDBEFR=C';',FIXLEN=20)),                                     
   BUILD=(1,4,%37)                 
/*                                 

Re: Extracting the fields from DSN

PostPosted: Thu Dec 18, 2008 5:24 pm
by Naveen@Uppi
Hi,

Yes, I needed to extract the 37 th delimiter value.

But u submittted the JCl and i am getting :
WER268A INREC STATEMENT : SYNTAX ERROR
WER211B SYNCSMF CALLED BY SYNCSORT; RC=0000

Is it because of authorization problem.

Is there ant other way we can extract the 37 th delimiter value.

Thanks and regards,
Naveen N

Re: Extracting the fields from DSN

PostPosted: Thu Dec 18, 2008 10:36 pm
by Frank Yaeger
The job works fine with DFSORT. But the WER messages indicate you're using Syncsort, not DFSORT.

I'm a DFSORT developer. DFSORT and Syncsort are competitive products. I'm happy to answer questions on DFSORT and DFSORT's ICETOOL, but I don't answer questions on Syncsort.

Re: SYNCSORT - Extracting the fields from DSN

PostPosted: Fri Dec 19, 2008 4:13 am
by dick scherrer
Hello,

Please post the complete information presented by the sort.

Use copy/paste and the "Code" tag for readability and alignment.

Re: SYNCSORT - Extracting the fields from DSN

PostPosted: Fri Dec 19, 2008 5:59 pm
by Naveen@Uppi
HI,

The complete error message is:

WER903I SYNCSORT 1.2.1.0 IS NOT LICENSED FOR SERIAL 78C0F, TYPE 2094 732, LPAR 7, MSU 1650.
WER903I SYNCSORT WILL STOP WORKING IN 41 DAYS UNLESS A VALID KEY IS INSTALLED.
WER268A INREC STATEMENT : SYNTAX ERROR
WER211B SYNCSMF CALLED BY SYNCSORT; RC=0000
WER449I SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE

Thanks and regards,
Naveen N

Re: SYNCSORT - Extracting the fields from DSN

PostPosted: Fri Dec 19, 2008 11:42 pm
by dick scherrer
Hello,

You are running Syncsort rather than DFSORT. You are also not running the current release of Syncsort.

Suggest when your organization renews the license, they also upgrade to the current release (1.3).

Once this is done, try the job again and post back here if there are any problems.