STRPCCMD question - IBM AS400

This is a discussion on STRPCCMD question - IBM AS400 ; We need to execute .bat file that is on a network folder from an option on an AS400 menu. The folder names contain spaces and the pc that the option is running from does not necessarily have that folder mapped ...

+ Reply to Thread
Results 1 to 4 of 4

Thread: STRPCCMD question

  1. STRPCCMD question

    We need to execute .bat file that is on a network folder from an
    option on an AS400 menu.
    The folder names contain spaces and the pc that the option is running
    from does not necessarily have that folder mapped as a drive.

    Manually typing STRPCCMD ('SUBST O: \\servername\foldername') will
    map a network drive.
    However, when I do this in a CL program the mapping does not seem to
    be done.

    If I try to run: STRPCCMD ('\\servername\foldername\batchfile.bat') I
    get an error - STRPCCMD does not like the use of the full network
    path.

    I haven't used STRPCCMD for so long - it's obsolete anyhow...
    Is there an easier way to execute this command from an AS400 menu?

    Thanks in advance...


  2. Re: STRPCCMD question

    1) are you sure the user that is logged into the local PC has rights to the
    server? Th e user that is logged into the local PC must be fully authorized
    to the share name, Log in and try it at the PC command level and see what
    happens.
    2)) are you even using CAE?
    3) is is a folder or a server share name?

    I use the net use command from strpccmd and have no problems. Try running
    the strpccmd with pause (*yes).

    Try just sending down:
    strpccmd pccmd('subst o: \\server\sharename') from the iSeries application
    instead of the batch file.

    or maybe use the "net use o: \\server\sharename" command.

    Good Luck
    Bill

    "poddys" wrote in message
    news:1180730225.002746.275060@o5g2000hsb.googlegro ups.com...
    > We need to execute .bat file that is on a network folder from an
    > option on an AS400 menu.
    > The folder names contain spaces and the pc that the option is running
    > from does not necessarily have that folder mapped as a drive.
    >
    > Manually typing STRPCCMD ('SUBST O: \\servername\foldername') will
    > map a network drive.
    > However, when I do this in a CL program the mapping does not seem to
    > be done.
    >
    > If I try to run: STRPCCMD ('\\servername\foldername\batchfile.bat') I
    > get an error - STRPCCMD does not like the use of the full network
    > path.
    >
    > I haven't used STRPCCMD for so long - it's obsolete anyhow...
    > Is there an easier way to execute this command from an AS400 menu?
    >
    > Thanks in advance...
    >




  3. Re: STRPCCMD question

    poddys writes:

    > If I try to run: STRPCCMD ('\\servername\foldername\batchfile.bat') I


    I think that you need to invoke such commands prepended with the
    "start" command.

    See "start /?" for options to get started.
    --
    Thorbjørn Ravn Andersen

  4. Re: STRPCCMD question

    I have used start to open an Access database in the past, but if I remember
    correctly, it does not scan the remainder of the command line to run a macro
    for example.

    Peter Kinsman

    "Thorbjoern Ravn Andersen" wrote in message
    news:yu2fy5bti77.fsf@luhmann.netc.dk...
    > poddys writes:
    >
    >> If I try to run: STRPCCMD ('\\servername\foldername\batchfile.bat') I

    >
    > I think that you need to invoke such commands prepended with the
    > "start" command.
    >
    > See "start /?" for options to get started.
    > --
    > Thorbjørn Ravn Andersen




+ Reply to Thread