How to include division name in fromxsf output for export?

  • Windows Server 2012
  • XPP 9.2

We often output many divisions of a job to a single Xyascii text file, and process that text file with Perl. In some cases we need the division name in that text file when the output changes to that division. I've looked through the help screen for fromxsf with no results. On our old Linux XPP I had this output at the top of each division in the text file:

{DIVNAME=DIV_01-front}
(Xyascii stuff, of one or more pages)
{DIVname="DIV_02-body"}
(many Xyascii pages of products)
etc


I did this using a shell script and an array of division names to output and concat to a single text file. But now on Windows Server 2012 I cannot get arrays to work in a batch file. If anyone can get the division name output to a text file with multiple divisions, I would be very grateful.

The reason for the division name is we need to process some divisions differently and we don't have another way to do ID different divisions. We cannot rely on operators entering special codes for this by hand.


Thanks!
Chuck

Parents Reply
  • Here we go, you have to escape a % with another % sign in a .bat file. Here's what worked:

    -hdr "Name %%d"

    at the very end of the command line. Here's the whole command .bat file:

    set outdir=c:\perlprogs\chuck\nof\159886createseat-20190617
    set outfile=%outdir%\159886some.txt
    if not exist "%outdir%" (
        echo ERROR: %outdir% not found
        goto noparam
        )

    del %outfile%

    fromxsf %outfile% +m -nbs -dos -Rep -nofrills -xyp 4 -job -div DIV_one,DIV_two -cat -hdr "Name %%d"

    I just searched for "How to use % in .bat file".

Children
No Data