PDIR Field Separator Option Request

  • This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.
Jan 9, 2009
40
0
#1
I have two enhancement requests for PDIR:
1. Most Important- Optional ability to suppress the blank/space character that is automatically inserted between fields. If one is needed between particular fields it can be added with the literal capability that already exists.
2. Would be nice- Optional ability to specify the field separator character(s) other than the default blank/space character.

Reason:
I have been trying to use PDIR on V9.02 to create SQL Server BCP input text data and it works perfectly except for the blank/space field separator character that PDIR inserts between fields. I can't simply massage the output to eliminate all blanks because some fields contain wanted blanks.

Maybe there is already a way to do this that I just haven't figured out, and if so, maybe someone can point me in the right direction. What I have been doing to get around this is to copy/paste the PDIR output into my text editor, setting the column bounds to include only those columns where I want to eliminate the blank/space characters, and then replacing them with "nothing" (everything shifts left over top of where the blanks were). I also realize that I could write a .BTM to do this, but with my suggestion, PDIR would be a one-step solution.

Carl
 
#2
BitPusher wrote:
| I have two enhancement requests for PDIR:
| 1. Most Important- Optional ability to suppress the blank/space
| character that is automatically inserted between fields. If one is
| needed between particular fields it can be added with the literal
| capability that already exists.
| 2. Would be nice- Optional ability to specify the field separator
| character(s) other than the default blank/space character.
|
| Reason:
| I have been trying to use PDIR on V9.02 to create SQL Server BCP
| input text data and it works perfectly except for the blank/space
| field separator character that PDIR inserts between fields. I can't
| simply massage the output to eliminate all blanks because some fields
| contain wanted blanks.
|
| Maybe there is already a way to do this that I just haven't figured
| out, and if so, maybe someone can point me in the right direction.
| What I have been doing to get around this is to copy/paste the PDIR
| output into my text editor, setting the column bounds to include only
| those columns where I want to eliminate the blank/space characters,
| and then replacing them with "nothing" (everything shifts left over
| top of where the blanks were). I also realize that I could write a
| .BTM to do this, but with my suggestion, PDIR would be a one-step
| solution.

I had requested the same for identical reasons years ago. I would still like
to have the feature.
--
Steve
 

rconn

Administrator
Staff member
May 14, 2008
10,100
85
#3
BitPusher wrote:

> I have two enhancement requests for PDIR:
> 1. Most Important- Optional ability to suppress the blank/space character that is automatically inserted between fields. If one is needed between particular fields it can be added with the literal capability that already exists.
> 2. Would be nice- Optional ability to specify the field separator character(s) other than the default blank/space character.
>
> Reason:
> I have been trying to use PDIR on V9.02 to create SQL Server BCP input text data and it works perfectly except for the blank/space field separator character that PDIR inserts between fields. I can't simply massage the output to eliminate all blanks because some fields contain wanted blanks.
>
> Maybe there is already a way to do this that I just haven't figured out, and if so, maybe someone can point me in the right direction. What I have been doing to get around this is to copy/paste the PDIR output into my text editor, setting the column bounds to include only those columns where I want to eliminate the blank/space characters, and then replacing them with "nothing" (everything shifts left over top of where the blanks were). I also realize that I could write a .BTM to do this, but with my suggestion, PDIR would be a one-step solution.
PDIR doesn't insert anything between fields. PDIR just displays the
character you used to separate the fields in the format argument.

Rex Conn
JP Software
 
Jan 9, 2009
40
0
#4
Thanks for the reply Rex.

You stated that:
"PDIR doesn't insert anything between fields. PDIR just displays the
character you used to separate the fields in the format argument."

Where is the space character comming from between AUTOEXEC.BAT and 2009 coming from in the following command?
[C:\]PDIR /(fn)/(dy) autoexec.bat
AUTOEXEC.BAT 2009
What PDIR command do I use to get the following result?
AUTOEXEC.BAT2009

Also I want to be able to specify the separator. Two of the many ways I tried to set a $ as the ONLY separator character were:
[C:\]PDIR /(fn)$/(dy) autoexec.bat
AUTOEXEC.BAT)$ 2009
and
[C:\]PDIR /(fn)/("$")/(dy) autoexec.bat
AUTOEXEC.BAT $ 2009

Maybe I've been looking at this too long, but I don't see any blank/space characters at all in these PDIR commands.

If the results I desire cannot currently be obtained I would still like my enhancement request to be added to the list for a future version.

Carl