IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

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


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
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
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 Developer


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

PostPosted: Mon Aug 21, 2006 10:35 pm
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
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 Developer


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

PostPosted: Tue Dec 05, 2006 3:48 am
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
Reply with quote

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

Global Moderator


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

PostPosted: Tue Dec 05, 2006 11:51 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts Access to non cataloged VSAM file JCL & VSAM 18
Search our Forums:

Back to Top