3 Replies Latest reply: Jul 30, 2014 3:16 PM by Angelo Abruzzese RSS

    Monarch extract fields -- how to

    Angelo Abruzzese

      Hi guys

       

      I am looking at an issue where I would prefer to resolve it from the monarch project angle instead of writing some other code.

       

      As it stands I have a report that is being parsed by Monarch and a pipe delimited extract file is created which is later used in a bulk insert to SQL.

       

      The issue I have is the report contains a field  say District ####  but in some cases my source report file has only ### with a leading blank:

       

      expected input '0123'  actual input ' 123'   and my extract file then contains  | 123| instead of |0123|

       

      Is there any way in the monarch project to force a leading zero if the number is below 1000 ?

       

      Source report:

       

      REPORT NUMBER MYREPORT - ##                                MYCOMPANY           

                                                         MY REPORT HEADING LINE      

                                                                                     

                                                         FROM 06/01/2014 - 06/07/2014

                                                                                     

      DISTRICT:   123 - MYDISTRICT ALPHA                                             

      SR. PROD MGR:   ## - SOMEBODY                                                  

      PRODUCT  MGR:     4 - SOMEONELSE                                               

                                            <- -  C O M P L E T E D - ->  <- - - - - -

      FAC MY VENDOR NAME                    INVOICES  LN-ITMS    $AMOUNT  INVOICE    %

      === ================================  ============================  ============

                                                                                     

                                                                                     

                                                                                     

          **** NO EXCEPTIONS                                                         

              

                                                                           

      Output extract:

      MYREPORT|2014-06-08|06/01/2014 - 06/07/2014| 123|MYDISTRICT APHA||||||||||||||||||SOME FIELDS|

       

       

       

       

       

      Thanks

      Angelo