1 Reply Latest reply: May 15, 2014 9:55 AM by Dan Cleveland RSS

    Dos Question or As400 expert

    Dan Cleveland

      Hi,

         I'm trying to automate a Monarch process. The problem is more related to an As400 data transfer.

      Sometimes no data is selected withing a data transfer from as400 query file - thus, a message is generated and someone needs to push the enter button, before dos will continue and go on to the next dos command. Does anyone know some code to get around this?

       

      Below is the sample .bat file where the .dtf is the automated transfer that creates the message when the file is empty. The other code sets the file name to file name + date.

       

      N:DanDts_PackagesPending_Work.dtf

       

      R:programMonarch.exe /prj:"N:DanMonarch_ModelsScheduled_ModelsPending_Work.prj" /pxall

       

      DEL K:DIVISIONENGINEERINGTech-OpsBilling_RptsPending_WorkPending_Work.txt

       

      @ECHO OFF

      FOR /F "TOKENS=2-4 DELIMS=/ " %%F IN ('DATE /T') DO (SET TODAY=%%F-%%G-%%H)

      REN K:DIVISIONENGINEERINGTech-OpsBilling_RptsPending_WorkPending_Work.xls Pending_Work.%TODAY%.xls

       

      I tried to redirect the job to a text file that I entered within, but that didn't work.

      example that didn't work:

       

      N:DanDts_PackagesPending_Work.dtf <enter.txt

       

      Any help would be appreciated.

        • Dos Question or As400 expert
          Dan Cleveland

          Able to answer own question. Here is the solution if anyone is interesed:

           

          Program (Transfer program) RTOPCB.exe with a switch /I (for ignore) works.

           

          Sample code below

          C:Progra1IBMClient1RTOPCB.exe /I K:REPORTSFileDataTransfersTuesday-Friday_DFAD99990W.dtf

          C:Progra1IBMClient1RTOPCB.exe /I K:REPORTSFileDataTransfersTuesday-Friday_Campaign51004DwDiNp.dtf

          C:Progra1IBMClient1RTOPCB.exe /I K:REPORTSFileDataTransfersTuesday-Friday_Campaign51004UpInRs.dtf

          C:Progra1IBMClient1RTOPCB.exe /I K:REPORTSFileDataTransfersTuesday-Friday_Campaign52004DwDiNp.dtf

          C:Progra1IBMClient1RTOPCB.exe /I K:REPORTSFileDataTransfersTuesday-Friday_Campaign52004UpInRs.dtf

          C:Progra1IBMClient1RTOPCB.exe /I K:REPORTSFileDataTransfersTuesday-Friday_Campaign53004DwDiNp.dtf

          C:Progra1IBMClient1RTOPCB.exe /I K:REPORTSFileDataTransfersTuesday-Friday_Campaign53004UpInRs.dtf

          C:Progra1IBMClient1RTOPCB.exe /I K:REPORTSFileDataTransfersTuesday-Friday_Campaign54004DwDiNp.dtf

          C:Progra1IBMClient1RTOPCB.exe /I K:REPORTSFileDataTransfersTuesday-Friday_Campaign54004UpInRs.dtf

          C:Progra1IBMClient1RTOPCB.exe /I K:REPORTSFileDataTransfersTuesday-Friday_Campaign55004DwDiNp.dtf

          C:Progra1IBMClient1RTOPCB.exe /I K:REPORTSFileDataTransfersTuesday-Friday_Campaign55004UpInRs.dtf

          C:Progra1IBMClient1RTOPCB.exe /I K:REPORTSFileDataTransfersTuesday-Friday_EQP5000DwDiNp.dtf

          C:Progra1IBMClient1RTOPCB.exe /I K:REPORTSFileDataTransfersTuesday-Friday_EQP5000UpInRs.dtf