Vendor file read

Sort:
You are not authorized to post a reply.
Author
Messages
slm4
Basic Member
Posts: 13
Basic Member
    I have never tried to read or use the vendor file before. I have been ask to create a file of all of the vendors for export. I need to know the coding to read file sequentially and any checks I would need to do in order to create that. Thanks.
    Georgette
    Veteran Member
    Posts: 52
    Veteran Member
      Hi Sim,

      I am assuming this is a one time use?

      I am a power user who uses either the Excel Add-In (KnowledgeBase Article 5164650 on how to install) or I write a Crystal Report. Both can be saved as csv files.

      The file name is APVENMAST. I would check for Active Status and also the VEN_CLASS field for EMP (employee) type since it will have the social security number as the vendor id. You may also want to inquire if they want to exclude any other classes.

      If you need it as a constant feed, then I am assuming a COBOL 4GL needs to be written. Perhaps someone else can assist with that as I do not have access in my current position.

      Hope this helps!

      Georgette
      Greg Moeller
      Veteran Member
      Posts: 1498
      Veteran Member
        What will you be using to read the file? Cobol, Perl, Shell Scripting, Add-Ins, others?
        Greg Moeller
        Veteran Member
        Posts: 1498
        Veteran Member
          Here is a "sample" sql you could run.
          
                   select  
                           trim(ven.vendor)           vendor,
                           trim(ven.vendor_vname)     vname,
                           trim(ven.vendor)||'-'||
                           trim(ven.vendor_vname)     vname1,
                           trim(ven.tax_id)           taxid,
                           trim(ven.vend_acct)        vend_acct
                   from    apvenmast ven
                   where   
                           ven.vendor_group = 1
                           and ven.ven_class = 'SUP'
                           and ven.vendor_status = 'A'
                   order   by ven.vendor
           
          [
          slm4
          Basic Member
          Posts: 13
          Basic Member
            Cobol
            slm4
            Basic Member
            Posts: 13
            Basic Member
              Hi Georgette,
              This will be an ongoing pull of vendors, so I am writing it in cobol and will schedule the job.
              Georgette
              Veteran Member
              Posts: 52
              Veteran Member
                Sorry sim4, it has been a while since I've used cobol. My present position does not require for me to have access. All I know is the files are defined in workdef.
                slm4
                Basic Member
                Posts: 13
                Basic Member
                  That's okay, thanks anyway.
                  You are not authorized to post a reply.