Results 1 to 2 of 2

Thread: Inputing a Text File

  1. #1

    Thread Starter
    Member
    Join Date
    Nov 2000
    Location
    Chicago
    Posts
    59
    I'm going crazy trying to figure this out. I have a text file where I have to take certain information out of and put it in a database and I have no idea how to do it because it doesn't follow any set pattern.
    Its pretty much in this format:

    1 SUPER MVS/PDF FILE/LINE/WORD/BYTE/SFOR COMPARE UTILITY - V4.20(ISPF) 00/11/09 14.05 PAGE 1
    LINE-# SOURCE SECTION SRCH DSN: PBUN.PROCLIB


    AC002UW <<-------- I need this

    67 //DIAIN DD DSN=&CTLCARD(AC002UWA),
    164 //SYSIN DD DSN=&CTLCARD(AC002UWB),
    238 //SYSIN DD DSN=&CTLCARD(UT300UDA),DISP=SHR
    And all this stuff in brackets in the next 3 lines, Any Ideas?

  2. #2
    Lively Member
    Join Date
    Jan 1999
    Location
    Lincolnshire, UK
    Posts
    111
    since it looks like the only brackets in the line are around the data you want you could do something like this

    Line Input #Fileid,Tempstring
    StuffIWant=mid(tempstring,instr(tempstring,"(")+1,instrrev(tempstring,")")-1)


    This may work or may need a bit of tweaking

    Cheers

    Chris

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width