[HPADM] Script question to make multiple file of fixed rec len of 255

From: Lal, Neeraj (Neeraj.Lal_at_pfizer.com)
Date: 09/12/03

  • Next message: Lodge, David: "[HPADM] RE: Script question to make multiple file of fixed rec le n of 255"
    To: "'hpux-admin@DutchWorks.nl'" <hpux-admin@dutchworks.nl>
    Date: Thu, 11 Sep 2003 18:18:58 -0400
    
    

    Hi Admins

    Here is the small question for scripting

    In a dir I receive files on daily basis the no of file is not fixed it may
    02 or 100 but the file name prefix & Suffix is Standard
    Which is PCHC_(-Some unique no-).EDI

    Every File has some records with 255 rec length and some records 455 I have
    to make all the files of same rec len which is 255.

    For a single file I can use the follwing script

    awk </medicaid/prod/edi/PCHC_0023.EDI \

    '
     {
     x1=substr($0,1,255);
     print x1;
     }
     '

    How should I process the multiple file ?

    Neeraj Lal
    Pfizer Inc.
    Consultant CHC-IS
    973-385-2734

    --
                 ---> Please post QUESTIONS and SUMMARIES only!! <---
            To subscribe/unsubscribe to this list, contact majordomo@dutchworks.nl
           Name: hpux-admin@dutchworks.nl     Owner: owner-hpux-admin@dutchworks.nl
     
     Archives:  ftp.dutchworks.nl:/pub/digests/hpux-admin       (FTP, browse only)
                http://www.dutchworks.nl/htbin/hpsysadmin   (Web, browse & search)
    

  • Next message: Lodge, David: "[HPADM] RE: Script question to make multiple file of fixed rec le n of 255"