MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How to extract delimited data

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL)
View previous topic :: View next topic  
Author Message
sateesh_gontla
Beginner


Joined: 23 Jan 2004
Posts: 40
Topics: 16
Location: Bangalore

PostPosted: Wed May 18, 2005 1:43 pm    Post subject: How to extract delimited data Reply with quote

Hi

I have the following record layout and like to have as :

"R97446","ABC D EFGHI","ABC.D.EFGHIxyz.com"

O/p should be :
Here "XXXXX" are 5 spaces between each word.

R9744XXXXXABC D EFGHIXXXXXABC.D.EFGHIxyz.com


Could anyone get this done using SYNCSORT ? Please help me.

Thanks.
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12380
Topics: 75
Location: San Jose

PostPosted: Wed May 18, 2005 1:48 pm    Post subject: Reply with quote

sateesh_gontla,

Is the position of the comma and the double quotes fixed?

ex:
Code:

----+----1----+----2----+----3----+----4----+
"R97446","ABC D EFGHI","ABC.D.EFGHIXYZ.COM" 


In the above data ,do the double quote be always at pos 1,8,10,22,24 and 44?

Similary does the comma be always at pos 9 & 23 ?

Please post the LRECL, RECFM for the input and output datasets

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
sateesh_gontla
Beginner


Joined: 23 Jan 2004
Posts: 40
Topics: 16
Location: Bangalore

PostPosted: Wed May 18, 2005 1:52 pm    Post subject: Reply with quote

Thanks for quick reply,

No, every record has its own length and the delimiter vary for every record. But max record length for 1 record is 80 chars.

Thanks,
sateesh.
_________________
Regards,
Sateesh
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12380
Topics: 75
Location: San Jose

PostPosted: Wed May 18, 2005 2:09 pm    Post subject: Reply with quote

sateesh_gontla,

There are no built-in features of sort that can used on variable delimiters. However you can write a quick easytrieve or sas pgm to delimit the record.

Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Frank Yaeger
Sort Forum Moderator
Sort Forum Moderator


Joined: 02 Dec 2002
Posts: 1618
Topics: 31
Location: San Jose

PostPosted: Thu May 04, 2006 11:54 am    Post subject: Reply with quote

Quote:
There are no built-in features of sort that can used on variable delimiters.


There are now for DFSORT. The new PARSE function available with z/OS DFSORT V1R5 PTF UK90007 or DFSORT R14 PTF UK90006 (April, 2006) makes this easy to do as shown by the DFSORT job below. For complete details on all of the new DFSORT and ICETOOL functions available with the April, 2006 PTFs, see:

www.ibm.com/servers/storage/support/software/sort/mvs/peug/

Code:

//S1 EXEC PGM=ICEMAN
//SYSOUT   DD SYSOUT=*
//SORTIN   DD DSN=...  input file
//SORTOUT  DD DSN=...  output file
//SYSIN DD *
  OPTION COPY
  INREC PARSE=(%00=(ABSPOS=2,FIXLEN=10,ENDBEFR=C'","'),
               %01=(FIXLEN=16,ENDBEFR=C'","'),
               %02=(FIXLEN=18,ENDBEFR=C'"')),
  BUILD=(%00,%01,%02,80:X)
/* :?:


Note: I know this won't help the poster who has Syncsort, but it might help other people who have DFSORT.
_________________
Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
Back to top
View user's profile Send private message Send e-mail Visit poster's website
advoss
Beginner


Joined: 23 Aug 2005
Posts: 26
Topics: 0

PostPosted: Mon May 08, 2006 11:33 am    Post subject: Reply with quote

If you have SAS available and are proficient with it you can easily parse out this file using INFILE DELIMITER="," DSD TRUNCOVER;
_________________
Alan Voss
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL) All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group