Unconfigured Ad Widget

Collapse

Announcement

Collapse
No announcement yet.

get size of IFS file

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Guest's Avatar
    Guest replied
    get size of IFS file

    I'll play around with that and see how it works. My big problem is that there can be many files in this folder and they change all the time. This client collects data from about 700 sources via email, FTP and propriotery software. These all go through a peliminary edit on the PC, renamed and sent to QDLS for batch processing on the AS400. These all have to be processed in several days and we get a lot of "garbage files". The person who processes them wanted one more tool to weed out bad ones. I have an RPG subfile pgm. that displays certain info but performance wise it has taken too long to get a file size to display on the fly. This has been running for years and I use a CPYFRMPCD to bring the files up for processing but just to get a record count before processing takes too long.

    Leave a comment:


  • Guest's Avatar
    Guest replied
    get size of IFS file

    Is there a quick way to get either the size or # of records in QDLS document from RPG or CL. There are hunderds of documents to be looked at to display a subfile so doing a CPYFRMPCD or CPYFRMIMPF take too long to process on each document. Thanks in advance, BILL

    Leave a comment:


  • Guest's Avatar
    Guest replied
    get size of IFS file

    Bill, You might try something like: qsh cmd('find /qdls/ -name '*.doc' -ls > /tmp/filelist.tmp') That should build a file named filelist.tmp in directory tmp in the IFS for all files with a .doc extinsion that are in directory QDLS. Ending in column 80 is the file size in bytes. The > sign pipes the output of the Unix find utility to the file specified on the right. The -ls option tells find to list the file attibutes. If you really need "records", you could try and count carriage returns in the file using something like grep, which is another Unix utility. Once you have the data in a file, you would read it in a program. Since RPG is one of your options, I would look at the open source and free (as in free speech, not free beer) iSeries-toolkit, which contains RPGIV programs that will read, write, update, etc. data in IFS files. The module and service program you need in the toolkit is named Unix. David Morris

    Leave a comment:


  • Guest's Avatar
    Guest replied
    get size of IFS file

    The PC side is not the problem. The problem is from green screen. I do a: DSPFLR FLR(MYFOLDER) TYPE(*DOC) OUTPUT(*OUTFILE) + OUTFILE(QTEMP/PCFILES) /* get dir of shared + folder */ Then build a subfile using the output of file PCFILES to display/process files in the folder. I use a CPYFRMPCD to bring the files up the native. At that point its easy to find out the # of records but I need to know this before the files are processed. DSPFLR as far as i can see doesnt supply this.

    Leave a comment:


  • David Abramowitz
    started a topic get size of IFS file

    get size of IFS file

    If you have authority, you should be able to navigate your way to QDLS through Windows Explorer. By changing the view, each document size should be displayed. Dave
Working...
X