Posted: Fri May 23, 2003 9:35 am Post subject: Comma Seperated File
Hi ,
I've a file like this
"feild1","feild2","feild3","","","feild4"
A comma seperated file with each feild value enclosed in double quotes.
I need an output file like this
feild1 feild2 feild3 (blank) (blank) feild4
with no double quotes and no commas and each feild starting at a specific byte.
I need to use this output file in another program.
I can do this with easytreive.But I would like to like to know if we can do this
using syncsort or any other utility.
Joined: 15 Dec 2002 Posts: 637 Topics: 43 Location: Bengaluru, INDIA
Posted: Fri May 23, 2003 10:10 am Post subject:
Vijay,
I do not use Syncsort. But, purely out of a programmer's curiosity, I would like to ask, whether, the lengths of field1, field2 etc. will be always be constant. At my place, often a character delimited file has trailing blanks in a field removed, so the field length becomes "variable". That is, the field might have been defined in a COBOL program as PIC X(5), but the type of data might make it's actual length to anything between 0 and 5. If this is the case, then I hope, you understand the onerous nature of your requirement. You will not be sure of the starting field or of it's length; these being the basic requirements of any SORT product. _________________ ALL opinions are welcome.
Debugging tip:
When you have eliminated all which is impossible, then whatever remains, however improbable, must be the truth.
-- Sherlock Holmes.
Do u guys have any solution for this in SAS ?If you know post the solution.I want to read the external file and create an external file as output.Please give the JCL
Joined: 02 Dec 2002 Posts: 415 Topics: 6 Location: Hove, England
Posted: Tue May 27, 2003 4:46 pm Post subject:
Vijay,
This code is an example of the kind of thing you need. The most important word is DSD:
[code:1:488dfcac85]
//G774909P JOB (7749),'FASTLOAD CSV',
// CLASS=C,MSGCLASS=E,NOTIFY=G774909
//*
//STEP010 EXEC SAS6 <== this may not match your version of SAS
//SYSPRINT DD SYSOUT=*
//FILEOUT DD DSN=&&CSV,DISP=(,PASS),
// UNIT=SYSDA,SPACE=(1,(5,1),RLSE),AVGREC=M,
// RECFM=FB,LRECL=80
//FILEIN DD *
101.1,FIELD002,FLD3,FIELD004
"2","FLD002","FIELD3","FIELD004"
32,FD002,,FLD004
,FD2,,
//SYSIN DD *
DATA _NULL_;
INFILE FILEIN DSD;
INPUT FIELD1 FIELD2 _________________ The day you stop learning the dinosaur becomes extinct
Joined: 02 Dec 2002 Posts: 1618 Topics: 31 Location: San Jose
Posted: Tue May 30, 2006 2:22 pm Post subject:
With z/OS DFSORT V1R5 PTF UK90007 or DFSORT R14 PTF UK90006 (April, 2006), you can now use DFSORT's new PARSE function to do this kind of thing, as shown by the DFSORT job below:
Support for delimited fields and the PARSE feature will be available in SyncSort for z/OS shortly. _________________ Alissa Margulies
SyncSort Mainframe Product Services
201-930-8260
zos_tech@syncsort.com
When these features become available, they will be fully documented. _________________ Alissa Margulies
SyncSort Mainframe Product Services
201-930-8260
zos_tech@syncsort.com
Syncsort Z/OS 1.2 supports IFTHEN, Overlay, Build parms, I don't see any documentation of the above features in syncsort z/os 1.2 Programmer's guide.
Syncsort has created an Addendum to the SyncSort for z/OS 1.2 Programmer's Guide which documents the BUILD, IFTHEN, IFOUTLEN, and OVERLAY Parameters. This Addendum is available to any licensed SyncSort for z/OS customer upon request. These features, along with PARSE, JFY, and SQZ will also be fully documented in our upcoming SyncSort for z/OS 1.3 manuals. _________________ Alissa Margulies
SyncSort Mainframe Product Services
201-930-8260
zos_tech@syncsort.com
Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
Posted: Fri Apr 20, 2007 1:13 pm Post subject:
Quote:
Syncsort has created an Addendum to the SyncSort for z/OS 1.2 Programmer's Guide which documents the BUILD, IFTHEN, IFOUTLEN, and OVERLAY Parameters. This Addendum is available to any licensed SyncSort for z/OS customer upon request. These features, along with PARSE, JFY, and SQZ will also be fully documented in our upcoming SyncSort for z/OS 1.3 manuals.
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