SYNCSORT - Extracting the fields from DSN



JES, JES2, JCL utilities, IDCAMS, Compile & Run JCLs, PROCs etc...

SYNCSORT - Extracting the fields from DSN

Postby Naveen@Uppi » Wed Dec 17, 2008 12:25 pm

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
Naveen@Uppi
 
Posts: 36
Joined: Wed Jul 23, 2008 6:49 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Extracting the fields from DSN

Postby Frank Yaeger » Wed Dec 17, 2008 10:26 pm

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)                 
/*                                 
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: Extracting the fields from DSN

Postby Naveen@Uppi » Thu Dec 18, 2008 5:24 pm

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
Naveen@Uppi
 
Posts: 36
Joined: Wed Jul 23, 2008 6:49 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Extracting the fields from DSN

Postby Frank Yaeger » Thu Dec 18, 2008 10:36 pm

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.
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: SYNCSORT - Extracting the fields from DSN

Postby dick scherrer » Fri Dec 19, 2008 4:13 am

Hello,

Please post the complete information presented by the sort.

Use copy/paste and the "Code" tag for readability and alignment.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: SYNCSORT - Extracting the fields from DSN

Postby Naveen@Uppi » Fri Dec 19, 2008 5:59 pm

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
Naveen@Uppi
 
Posts: 36
Joined: Wed Jul 23, 2008 6:49 pm
Has thanked: 0 time
Been thanked: 0 time

Re: SYNCSORT - Extracting the fields from DSN

Postby dick scherrer » Fri Dec 19, 2008 11:42 pm

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.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times


Return to JCL

 


  • Related topics
    Replies
    Views
    Last post