Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Tab delimited input file (Hex value '05').

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
Harel

New User


Joined: 07 Jul 2006
Posts: 2

PostPosted: Mon Aug 21, 2006 9:28 pm    Post subject: Tab delimited input file (Hex value '05').
Reply with quote

I have a tab delimited input file (Hex value '05'). The fields have varying beginning and ending columns. I'd like to create a fixed length output file, with the fields separated by 1 space. I also have date fields, formatted as mm/dd/yyyy, m/d/yyyy, and some with the time of day as well. I'd like to convert these to yyyymmdd format. Can anyone help?

Thanks.
Back to top
View user's profile Send private message

Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Mon Aug 21, 2006 10:35 pm    Post subject:
Reply with quote

I can show you how to use DFSORT to do this, but you need to show me an example of the input records and what you want for the output records. You can use q (or whatever) to indicate a X'05' delimiter. Also, what is the RECFM and LRECL of the input file? Show the various input and output dates in the example as well and indicate where they can occur (e.g. second and fourth fields, any field, ?).
Back to top
View user's profile Send private message
srj1957

New User


Joined: 15 Dec 2005
Posts: 72
Location: RALEIGH NC, USA

PostPosted: Tue Dec 05, 2006 3:24 am    Post subject:
Reply with quote

Hi ALL,
Please help as I have a similar problem...here is the input data LRECL=1000 RECFM=FB

Code:
"00002 0014 02","CORDRAN TAPE","FLURANDRENOLIDE"
"00002 0018 01","CAPASTAT SULFATE POWDER","CAPREO"
"00002 0019 01","SEROMYCIN CAPSULES","CYCLOSERINE"                             
"00002 0024 03","PERMAX TABLETS","PERGOLIDE MESYLATE"                           

I need to remove the quote marks (") and commas (,).

Create an output file by selecting each field delimited by the comma
The output record should be 450 bytes total fixed length
col1 = 50 col2 = 200 col3 = 200
So the first record should look like this, (imagine the cols are the specified length according to each colour) icon_wink.gif
00002 0014 02 CORDRAN TAPE FLURANDRENOLIDE

I tried the PARSE, but we don't have that option. Our system proggys are too busy to upgrade right now
Can anyone help out ?
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Tue Dec 05, 2006 3:48 am    Post subject:
Reply with quote

Well, this is exactly what DFSORT's PARSE function is for and the DFSORT job would be as follows:

Code:

//S1    EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SORTIN DD DSN=...  input file (FB/1000)
//SORTOUT DD DSN=...  output file (FB/450)
//SYSIN    DD    *
  OPTION COPY
  INREC PARSE=(%01=(STARTAFT=X'7F',ENDBEFR=X'7F',FIXLEN=50),
               %02=(STARTAFT=X'7F',ENDBEFR=X'7F',FIXLEN=200),
               %03=(STARTAFT=X'7F',ENDBEFR=X'7F',FIXLEN=200)),
    BUILD=(%01,%02,%03)
/*


But if you don't have the April, 2006 DFSORT PTF and you can't get your System Programmer to install it, then you can't use PARSE. I don't know of another way to do this with DFSORT other than writing your own E15 exit with the appropriate logic.
Back to top
View user's profile Send private message
srj1957

New User


Joined: 15 Dec 2005
Posts: 72
Location: RALEIGH NC, USA

PostPosted: Tue Dec 05, 2006 10:26 pm    Post subject:
Reply with quote

OK thanks Frank.....
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4649
Location: Raleigh, NC, USA

PostPosted: Tue Dec 05, 2006 11:51 pm    Post subject: Re: tab delimited input file
Reply with quote

That would leave you with the options of using SAS, REXX, or a data-mapping tool (Gentran, Mercator, Cloverleaf, etc.).
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Extra character appears in file when ... Balu5491 All Other Mainframe Topics 1 Wed Jul 26, 2017 2:39 pm
No new posts SSH - known_hosts file configuration vasanthz All Other Mainframe Topics 2 Wed Jul 26, 2017 2:10 am
This topic is locked: you cannot edit posts or make replies. Fetching data from BAI File arunsoods JCL & VSAM 1 Wed Jul 19, 2017 4:28 pm
No new posts Write out NODUPS but just from one file Jay Villaverde DFSORT/ICETOOL 8 Fri Jul 14, 2017 12:44 am
No new posts How to add header with Date(YYMMDD) i... Rajan Moorthy DFSORT/ICETOOL 2 Thu Jul 06, 2017 11:44 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us