Information Systems:Carrier Interface (legacy)

From uniWIKI
Jump to navigation Jump to search

Overview

Carrier Interface is a series of Infonet and RPG programs that integrate shipping info (tracking, billing etc.) from our transportation/courier partners. It comprises many technical elements, and there are distinct areas, such that 'Carrier Interface' is really a large topic. This page may be thus be converted into a category in the future.

Waybills

This starts with uniPHARM preparing shipments to go mostly to our customers; but also to our suppliers, government agencies, banks, etc. Information on these shipments can be sent automatically via FTP for the System i (Atlas – 30% of total amount), manually entered into a PC, which is then transmitted to the courier (Loomis – 65% of total amount), or through manually written waybills (half dozen or so couriers that are used less often; ie Sea Air, VanKam, etc – 5% of total amount). (These percentages are based on courier charges from Jan 1, 2015 to Mar 31, 2015.)

Deliveries

We can receive pickup and delivery information from the carrier for these shipments. We receive it from Atlas at close to real time; we don’t get it now from Loomis, but there is possibility of getting a file with delivery information; and we don’t get anything from the less used carriers.

Invoices

Loomis generates invoices for the previous week (Saturday to Friday), and makes them available to us on Monday – we pick them up from their FTP server using a scheduled job (job name DHLINV). Atlas is not as automated, and manually prepares invoices weekly, and on the last day of the month. Because we don’t know for sure when they will be ready, the scheduled job (same one that gets Loomis’ invoices) runs at 10PM on Monday, Tuesday, and Wednesday. The less used carriers send us paper invoices, which Gerald keys into a spreadsheet and uploads into WebSmart (the instructions are in ‘Other Carriers’ further down in this document).

To see what this scheduled job does, go to Unity / Start uniPHARM Extensions / VA Company / Work with UWD IT Tools / FTP Connections / Carrier Invoice FTP Config. Press page down to see the records.

WORK WITH DATA IN A FILE                       Mode . . . . :   CHANGE         
Format . . . . :   CIINVFTR                    File . . . . :   CIINVFTPP      
                                                                               
Carrier:            DHL                                                        
Sequence:           1                                                          
Description:        DHL Richmond General Account                               
FTP Server:         ebilling.loomis-express.com                                
FTP User ID:        mv5873                                                     
FTP Password:       *******                                                    
FTP Directory:      MU7048                                                     
Last File Trans:    MU7048_5468834.csv                                         
Next Sequential #:  1375                                                       
Archive Folder:     ____________________                                                           
Processing Program: CICINV09                                                   
                                                                               
F3=Exit                 F5=Refresh               F6=Select format              
F9=Insert               F10=Entry                F11=Change                    
                                                                               

‘Last File Transmitted’ is very important; we are not allowed to delete or move files on Loomis’ server, so we must be able to tell which files we have already picked up. ‘MU7048’ is the account number, and ‘5468834’ is the invoice number. As they send us invoices in sequence, we have only to transmit files that have a name higher than the last one. Note that we will have a problem if we get to invoice ‘9999999’. It will either have to start again at 1, or go to 8 digits. We will have to get Loomis to clear all the old files out, and change this field to ‘MU7048_0’. It speeds up our whole process, if we occasionally ask them to delete old files.

‘Next Sequential Number’ is used to give each file received a unique name in our archive. File CIDOWNP contains, in separate members, every invoice file we have received. The members are named with ‘Carrier’, ‘Sequence’, and ‘Sequential #’. For example, the latest one for this account is ‘DHL11374’.

‘Processing Program’ is the program to run to read the files from the carrier, and add them to our files; CIINVP, and CIWAYBILLP.

Atlas

Overview

Atlas (for the lower mainland) is the carrier most automated to the IBM i. Shipping records, that contain information on all the packages that they will pick up and deliver for us, are created when picking is completed, and transmitted to Atlas (via Datatrac) . Transmission times are just before the time the drivers come to uniPHARM to pick up the shipments. Datatrac splits up the shipments by route, and downloads to each driver’s hand held unit. The drivers scan the boxes as they pick them up from our warehouse, then scan them again when they deliver them to our customers. We receive scan data back just moments later. Up to three times a month, we receive electronic invoices; which contain details by each shipment (waybill).

Process

A step was added to INRUP070 (Post-Pick Processing Driver), which reads and processes file UZEXITP (Exit Points Control).

Sequence   Program       Description
 10        PLZIU201      Confirm pick list by lic plate 
 30        PLZIU231      Print box labels               
 35        INRUP060      Print invoice(s)               
 40        PLZIU380      Confirm box labels             
 50        INRUP061      Confirm invoice(s)             
 60        PLZIU251      Price Tickets                  
 70        PLZIU260      Confirm price tickets          
 80        NCRUP001      Print narcotics control form   
 90        PLZIU350      Confirm Narcotics Control Form
100        PLZIU510      Carrier Interface    

PLZIU510 (Build shipment file for Atlas) reads the pick list and checks that ‘Atlas’ is the method of transport. If so, it builds a shipment record for each box label printed. (For example, three box labels for pick list 7123456 would generate shipments 7123456001, 7123456002, and 7123456003.) If the pick list is in zone group ‘PROMO’ the shipments are put into a hold file (it may be up to two weeks before they are actually shipped – more on that later in this document); otherwise they are put into the shipment file. For each box label, a record is added to UXSDOCP (Shipping documents control file). There is a bit of a kluge – there is not a ten digit field available, so the box number is put into the ‘control number’ field. To reconstruct the shipment number, pick list number and control number have to be concatenated.

There are six jobs in ‘Job Schedule Entries’ that transmit to Atlas. (The command to see these is WRKJOBSCDE.)

ATLAS01 – transmits at 6:15AM Monday to Friday
ATLAS02 – transmits at 1:15PM Monday to Friday
ATLAS03 – transmits at 1:35PM Monday to Friday
ATLAS04 – transmits at 7:15PM Friday
ATLAS07 – transmits at 6:45PM Friday

There are two transmissions for the afternoon pick up on Monday to Friday. The first one is to give Atlas time to process the bulk of the shipments before the drivers arrive at our warehouse; the second is to get any last minute picks.

The transmissions Friday evening is for an early pickup Saturday morning at Atlas – not at uniPHARM (the warehouse is closed on Saturdays).

These scheduled jobs run PLCIU511 (FTP Atlas carrier file), passing either ‘AM’ or ‘PM’ to indicate morning or afternoon pickup.

PLCIU511 calls PLZIU511 (Build Atlas carrier file to FTP), which moves records from the shipment file into a work file, which will be FTP’ed to Atlas, and into an archive file, which also includes the date and time of transmission.

As the pickers may have already started picking for the next Atlas pickup, we have to look at each pick list to determine whether or not it should be transmitted at this time. We only transmit records that have a cut off time earlier than the time we are transmitting or are for a pick list that has a pick priority of 01 (these are orders that missed cutoff, but are to be shipped anyway).

We have to also deal with records that may have earlier cut offs (picked late, or shipped promos – more on this later in this document). For morning and afternoon runs, the account and shipper must be set up correctly. If this is an ‘AM’ run, the account must be ‘644’, and the shipper ‘74422911’. If it is a ‘PM’ run, they must be ‘621’ and ‘55253145’. If this is a ‘PM’ run, the pickup date must be today. If it is an ‘AM’ run, and the current time is before noon, the pickup date is today; if it is after noon (for example 7PM Friday), the pickup date is tomorrow.

Then PLZIU513 (send Atlas file to FTP server) is called. This will transmit and clear the work file, and add a record to the log file.

Manually Add Shipments

Promos may be held for up to two weeks after picking; therefore their shipping records go into a hold file. When they are shipped, their box labels are scanned with program PLZIU512 (move Atlas shipment to transmission file) which will add the scanned shipment to the shipment file, and remove it from the hold file.

This program has multiple uses (rather than making the user select a program from the menu, this program determines what they (most likely) want, and does it).

- if the scanned box label is in the shipment file, nothing is done

- if the scanned box label is in the promo (hold) file, it is removed from there, and written into the shipment file, to be included with the next transmission to Atlas.

- if the scanned box label is in the archive file, it is copied back into the shipment file, to be included with the next transmission to Atlas.

- if the box label is for a pick list, the method of transport is changed to ‘Atlas’, and a shipment record is created.

- if the first 5 characters of the scanned code is a customer number, then this is either mail or a special box label. So a record is added to the shipment file, to be included with the next transmission to Atlas. In these cases, the generated waybill number on the label starts with the customer number, so the delivery information can be retrieved.

- if none of the above is true, a message is displayed saying the number was not recognized.

Cancel Box Label

Every regular box label printed (not mailing labels or special labels) goes into either the shipping or hold files. Any label not used will have to be cancelled. Program PLZIU514 (Cancel box label) will remove the scanned box label from either the shipment or hold file.

Generate Extra Box Label

If more box labels are required, the user cannot just go into ‘reprint’; they must also be added to the shipment file. PLZIU515 (Generate extra box label & add to shipment file) will print the next sequential box label (not necessarily the next one after the label scanned, but after the last one generated), and add it to either the shipment or the hold file. It will also be added to UXSDOCP (Shipping documents control file).

Include Orders that Missed Cutoff

If a pick list has a pick status of 01, the shipping record will be included with the next transmission, instead of waiting until after the cutoff time.

Inquiry

‘SD – Shipping Documents’ has been activated in ‘Pick List Status’. This will show all the shipping records generated (on for each box label). It shows the date and time picked, and the date and time transmitted to Atlas.

There is a ‘Carrier Interface’ menu in InfoNet. There is a shipment inquiry with filters and sort options, and a list of promo shipments that have not yet been sent.

Transmission

You can see a log of transmissions to Datatrac for Atlas shipments. Go to Unity / Start uniPHARM Extensions / VA Company / Warehouse Menu / Picking and Shipping Menu / Retransmit File, View Log. The date range prompt defaults to today; change it if you want.

 2/27/15  13:18:06    uniPHARM -- PRODUCTION               PLRIQ047/LISTCTL    
                           PLZ - Transmission Logs         PRODUCTION  1.00    
Display Order                  Carrier  Date Range                             
SHNUM Control number, descend           FEB 25 15 12:01 AM  FEB 27 15 11:59 PM 
SD=Shipping Documents   TR=Retransmit                                          
   Transmitted        Records Car Whs File Name                                
__ FEB 27 15  1:15 PM     301 ATL MAI 5_DIST_20150227131501_RCV64830980.dist   
__ FEB 27 15  6:15 AM     505 ATL MAI 5_DIST_20150227061502_RCV64830980.dist   
__ FEB 26 15  1:35 PM       8 ATL MAI 5_DIST_20150226133500_RCV64830980.dist   
__ FEB 26 15  1:15 PM     266 ATL MAI 5_DIST_20150226131501_RCV64830980.dist   
__ FEB 26 15  6:15 AM     419 ATL MAI 5_DIST_20150226061502_RCV64830980.dist   
__ FEB 25 15  1:35 PM      11 ATL MAI 5_DIST_20150225133500_RCV64830980.dist   
__ FEB 25 15  1:15 PM     256 ATL MAI 5_DIST_20150225131501_RCV64830980.dist   
__ FEB 25 15  9:54 AM     429 ATL MAI 5_DIST_20150225095421_RCV64830980.dist   
__ FEB 25 15  6:15 AM     429 ATL MAI 5_DIST_20150225061501_RCV64830980.dist   
                                                                               

Most of the times shown are the same as the ones in WRKJOBSCDE, so were the automated transmissions. It happened that on Feb 25 Datatrac FTP server was down, so we had to transmit again manually. I did this by keying in TR (Retransmit) in front of the 6:15AM line, and pressing enter. The FTP process shows on the screen, so you can see whether or not it is successful. When FTP is complete, you must press enter to exit.

To look at the original 6:15 transmission to see what happened, go to Unity / Start uniPHARM Extensions / VA Company / Work with UWD IT Tools / FTP Logs / Atlas FTP Logs.

Press F11 to see the dates and times that the logs were created.

                         Work with All Spooled Files                           
                                                                               
Type options, press Enter.                                                     
  1=Send   2=Change   3=Hold   4=Delete   5=Display   6=Release   7=Messages   
  8=Attributes        9=Work with printing status                              
                                                                                
                                              Creation  Creation               
Opt  File        User        Form Type   Pty  Date      Time                   
 _   QPRINT      ATLAS       *STD         5   02/23/15  13:35:00               
 _   QPJOBLOG    ATLAS       *STD         5   02/24/15  01:02:44               
 _   QPRINT      ATLAS       *STD         5   02/24/15  06:15:02               
 _   QPRINT      ATLAS       *STD         5   02/24/15  13:15:01               
 _   QPRINT      ATLAS       *STD         5   02/24/15  13:35:00               
 _   QPJOBLOG    ATLAS       *STD         5   02/25/15  01:02:58               
 5   QPRINT      ATLAS       *STD         5   02/25/15  06:15:01               
 _   QPRINT      ATLAS       *STD         5   02/25/15  13:15:01               
 _   QPRINT      ATLAS       *STD         5   02/25/15  13:35:00               
                                                                       More... 
Parameters for options 1, 2, 3 or command                                      
===>                                                                           
F3=Exit   F10=View 1   F11=View 3   F12=Cancel   F22=Printers   F24=More keys  

Either page down to find the date and time you want, or press F18 to go to the end, and page up. Use option 5 to display.

                                       Display Spooled File                                                        
File  . . . . . :   QPRINT                                                  Page/Line   1/6           
Control . . . . .   _________                                               Columns     1 - 130       
Find  . . . . . .   _________________        
*...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8....+....9....+ 
Input read from specified override file.
Connecting to host FTPMAILBOX1.ETRAC.NET at address 204.193.149.206 using port 21.    
Cannot connect to host FTPMAILBOX1.ETRAC.NET at address 204.193.149.206. Try again later.
Enter an FTP subcommand.                 
> open ftpmailbox1.etrac.net                            
Connecting to host ftpmailbox1.etrac.net at address 204.193.149.206 using port 21.            
Cannot connect to host ftpmailbox1.etrac.net at address 204.193.149.206. Try again later.                  
Enter an FTP subcommand.                      
> user 97412433 ********            
You must first open a connection.                   
Enter an FTP subcommand.                                       
> cd in_ready                        
You must first open a connection.
Enter an FTP subcommand.                            
> put qtemp/atlaspfx 5_DIST_20150225061501_RCV64830980.dist          
                                                                                                                           
You must first open a connection.                
Enter an FTP subcommand.                                   
> quit

Scan Data

As Atlas receives pick-up and delivery scans back from their drivers, they process them, and send them to our FTP server.

Every day, a job runs to check for these. To see it, key in WRKACTJOB SBS(MONITOR2) and press enter.

                            Work with Active Jobs                     BART     
                                                            05/02/14  15:55:20 
CPU %:      .0     Elapsed time:   00:00:00     Active jobs:   535             
                                                                               
Type options, press Enter.                                                     
  2=Change   3=Hold   4=End   5=Work with   6=Release   7=Display message      
  8=Work with spooled files   13=Disconnect ...                                
                    Current                                                    
Opt  Subsystem/Job  User        Type  CPU %  Function        Status            
     MONITOR2       QSYS        SBS      .0                   DEQW             
       ATLAS_INT    ATLAS       BCH      .0  PGM-ATCUP010     MSGW             
       EDIMON_PRD   EDIUSER     BCH      .0  PGM-EDCUP040     MSGW             
       FTP_ORDERS   EODJOB      BCH      .0  PGM-AICUP010     MSGW             
       ORDALLOCFL   EODJOB      BCH      .0  DLY-15:59:59     DLYW             
                                                                               
Parameters or command                                                          
===>                                                                           
F3=Exit   F5=Refresh       F7=Find      F10=Restart statistics                 
F11=Display elapsed data   F12=Cancel   F23=More options   F24=More keys       
                                                                               

This runs all day, to FTP this data from our FTP server to the i. To see it, in extensions, go to 22 Work with UWD IT Tools, 32 FTP Monitors, then 7 Atlas Return Data Monitor.

12/12/11 10:09:33         ATLAS Int. Status                      ATRIU010/CTL  
                       uniPHARM -- PRODUCTION                               
                                                                               
 Monitor status:  Running     Waiting for next poll                            
   Last activity: 12/12/11 10:09:32               Poll interval:   3 minutes   
                                                                               
__________   Date CCYYMMDD                                                     
                                                                               
  Time Stamp                   File                                       Recs 
2011-12-12-10.09.32.619000     5_dist_74422911_53vj7k0.dist                  1 
2011-12-12-10.09.32.590000     5_dist_74422911_53vj6f0.dist                  6 
2011-12-12-10.09.32.559000     5_dist_74422911_53vj2j0.dist                  9 
2011-12-12-10.05.51.033000     5_dist_74422911_53vj000.dist                  6 
2011-12-12-10.05.51.010000     5_dist_74422911_53viyu0.dist                  1 
2011-12-12-09.59.08.547000     5_dist_74422911_53vipu0.dist                  8 
2011-12-12-09.59.08.503000     5_dist_74422911_53vin10.dist                 21 
2011-12-12-09.59.08.448000     5_dist_74422911_53vile0.dist                 13 
2011-12-12-09.55.47.087000     5_dist_74422911_53vik80.dist                  6 
2011-12-12-09.55.47.065000     5_dist_74422911_53viga0.dist                  4 
                                                                               
 F3=Exit   F5=Refresh                      F8=End Mon   F9=Poll Now            
 F13=Config                      F15=Atlas Messages F16=W/W Mon Job   F12=Exit 
                                                                               

This shows the names, sizes, and the times of all the files we have received. As well as the fact that we look every three minutes. As you can see, Atlas sends the data to us as soon as they receive it from their drivers (instead of batching it), which means the data in our system is within moments of being current.

F13, and page down, will show the FTP configuration.

WORK WITH DATA IN A FILE                       Mode . . . . :   CHANGE         
Format . . . . :   ATLCONFR                    File . . . . :   ATLCONFP       
                                                                               
*RECNBR:                   1                                                   
ATLCARR:                                                                       
ATLSROM:                                                                       
FTP Server:         ftpmailbox1.etrac.net                                      
FTP User ID:        97412433                                                   
FTP Password:       ObEjFist                                                   
FTP Directory:      in_ready                                                   
UWD FTP Svr:        mail.unipharm.local                                        
UWD FTP User ID:    atlas                                                      
UWD FTP Pwd:        65gJ2V                                                     
UWD FTP Dir:                                                                   
Monitor JOBQ:       MONITOR2                                                   
Monitor JOBQ Lib:   *LIBL                                                      
Monitor Job Name:   ATLAS_INT                                                  
Monitor Poll Wait:    3                                                        
Monitor Poll Pause:  20                                                        
Prt FTP Logs:       N                                                          
                                                                               

The ‘FTP’ fields are used to transmit to Atlas, the ‘UWD’ fields are to receive from our FTP server.

On the interface status display, if ‘F15=Atlas Messages’ is red, there is a message. Press F15 to have a look. If there is an error, make note of the date and time. (Clear out all these messages occasionally.) Go back to the ‘Unipharm IT Tools’ menu, and select 31 FTP Logs, then 7 Atlas FTP Logs. Press F11 to see the date and time, then find the log corresponding to the error message.

Process

ATRUP010 receives the files via FTP into ATDOWNP; each file into a separate member. It then calls ATRUP020 for each member; which maps the data into ATLRTNP.

Invoices

Atlas invoices on Saturdays, and on the last day of the month. It can be up to two or three weeks until Maria manually puts them onto our FTP server; into FTP Root / Atlas / Ainvoices. There is a scheduled job, DHLINV, which runs Mondays and Wednesdays at 10PM to get invoices from Atlas and Loomis.

The file names are formatted like e00644.122 where ‘644’ is the account number, and ‘122’ is the day of the year. This means that file names will be duplicated between years. Be sure to go into FTP Root / Atlas / Ainvoices / archive periodically to move the archived invoices into folders for each year. If you don’t, and file names are duplicated, they will not be archived after being uploaded; which means they will be updated again every time DHLINV (the scheduled program) runs.

InfoNet

In the section ‘Carrier Interface’, you can look at shipments; special orders and promos that have been picked but not yet shipped (holds); invoices and waybills.


Loomis

Using Loomis PC software, ‘Laser’, the shipper creates a waybill. This is not on the System i, and we do not receive any scan data. Invoices and waybills are produced and made available electronically on Mondays. A scheduled job runs on Monday evening, and picks them up from Loomis’ FTP server. We can see these in InfoNet.


Other Carriers

Gerald builds the spreadsheet from carrier invoices, then when the month is complete, emails it to me (it’s called ‘customer skid freight’). It has several months, so make sure to use the correct sheet. Also, as he may send more than one month at a time, check for last month on file, and load everything that is missing. However, don’t go past the month he says is complete – he may have already started entering the following one.

To confirm that a sheet has been uploaded, look at carrier invoices in InfoNet, and filter for one of the miscellaneous carriers; for example Sea Air. Click twice on invoice date, to get a sorted list; newest invoices first.

Carrint-3.jpg

Compare this to the completed months in the spreadsheet, and upload those that are missing.

I sort the sheet by carrier, invoice number, and customer (columns A, C, and G); then check to make sure that no invoices duplicate what is already on file. To do that, I go into ‘Carrier Invoices’ in InfoNet, filter by each carrier, and sort by invoice number. If one is found, I change the spreadsheet to make it different; but still recognizable.

If the invoice number column is blank, put something in. Maybe carrier code and date?

Check to make sure there are no typos in the dates; for example 2041 for year instead of 2014.

Make sure the carrier codes are correct; also in upper case. (‘Van’ must be changed to ‘VAN’.)

Change all the numeric fields to general, so they will not have commas or dollar signs.

Save that sheet as .csv in tech/sheilav/freight as ‘miscyyyymm.csv’.

In InfoNet got to Carrier / Upload Carrier Invoices. Click on browse; find and select file. Click on upload.

The overnight process will update these to the ‘freight to sales analysis’ file, for the current month and the previous month. If you have uploaded invoices older than that, the file will have to updated manually. (call bldsumfrt ‘YYYYMM’)


Consolidate Pick Lists

Multiple narcotic orders can be consolidated into one box so that we only have to pay for one shipment.

- On RF guns, select ‘Shipping’, then select ‘Print Dup Narc Shpmnts’. This will run PLZIU450 (PLZ -- Print list of multiple ctrl narc shipments).

- On RF guns, select ‘Shipping’, then select ‘Consolidate Dup Orders’. This will run PLZIU460 (PLZ -- Consolidate Pick lists). As the box labels of the shipments to be consolidated are scanned, records are added to PLCONSP (PLZ -- Consolidated pick lists), and to UXSDOCP (INV -- Shipping Documents Control File). If the scanned shipment is in the Atlas transmission file, it will be removed, and the consolidation shipment added.

  • All shipments must be for the same customer
  • If the scanned shipment is already in a consolidation, it will be removed from it. If that consolidation is then empty, it will be removed from UXSDOCP and ATLASP.

- Press enter to exit. PLZIU461 (PLZ -- Print box labels for consolidated picks) will run. If all the shipments that were consolidated were for the same zone, the box label will be printed on that zone printer. If there was more than one zone consolidated, the label will be printed at the mail station.

- If this is an Atlas shipment, on RF guns, select ‘Shipping’, then select ‘Add Atlas Shipment’. This will run PLZIU512 (PLZ -- move Atlas shipment to transmission file) to add the shipment to file ATLASPF (), which will be transmitted to Atlas.

- Before the drivers leave, print the Atlas COS report, ATLAS_COS (ATLAS - Chain of Signature report). Instead of each original narcotic shipment printing, only the consolidation will.

  • as of 2014Jul18 the original Atlas shipments had to be manually removed from the shipment file. I will change PLZIU460 to do it automatically.

Problems

Atlas COS Report (Chain of Signature for narcotics) does not show consolidation

Shipment consolidation deletes records from ATLASPF for the original shipments, and replaces them with one record for the consolidation. Then when these records are transmitted, they are deleted from ATLASPF and added to ATLARCHP. The COS report prints from ATLARCHP. If the consolidation is done after transmission time, the original shipments are not in ATLASPF to be deleted (they are already in ATLARCHP), and therefor the consolidation is not added.

This is a validate process - not an error - so that consolidations can be done for other carriers. To confirm this, use Query on file PLCONSP in library UP1480bfVA, select records where PCPLNO is one of the pick list numbers, and look at the time added.

Atlas Driver’s Scanner Misread barcode

Carrint-1.jpg

The leading ‘3’ in the shipment (or waybill) number was read as a ‘W’. As we have the same information (date, time, and signature) under the correct number, the driver must have scanned the bar code again.

Carrint-2.jpg

Job ATLAS_INT has an error message

                        Additional Message Information                         
                                                                               
Message ID . . . . . . :   RNQ0100       Severity . . . . . . . :   99         
Message type . . . . . :   Inquiry                                             
Date sent  . . . . . . :   04/21/15      Time sent  . . . . . . :   11:49:12   
                                                                               
Message . . . . :   Length or start position is out of range for the string    
  operation (C G D F).                                                         
Cause . . . . . :   One of the following has occurred in RPG procedure         
  ATRUP020 in program XX2480BP/ATRUP020 at statement 177:                      
  - A numeric length or start position is less than 1 or too large for the     
    string operation.                                                          
  - The search-argument parameter of the %SCAN built-in function has zero      
    length or is longer than the source-string parameter.                      
  - The maximum-length parameter of the %STR built-in function is not a value  
    between 1 and the maximum size of a character field.                       
Recovery  . . . :   Contact the person responsible for program maintenance to  
                                                                       More... 
Reply  . . . :   C                                                             
Press Enter to continue.                                                       
                                                                               
F3=Exit   F6=Print   F9=Display message details   F12=Cancel                   
F21=Select assistance level                                                    
                                                                               

This means that a file of the incorrect format was received from Atlas, and is in the folder ‘FTP Root / Atlas’ on the mail (or FTP) server.

You can key C for cancel to this message, then delete the file from the mail server. If this happens regularly, you can change program ATRUP010 to ignore this file, or type of file. This has been done a couple of times already, so you can copy change UWD6 or UWD7.

If you cannot figure out what is happening, you can have the monitor print a log. To do this, go to ‘Unity / Start uniPHARM Extensions / VA Company / Work with UWD IT Tools / FTP Monitors / Atlas Return Data Monitor’.

 4/21/15 12:15:43         ATLAS Int. Status                      ATRIU010/CTL  
                          uniPHARM -- PRODUCTION                               
                                                                               
 Monitor status:  Running     Waiting for next poll                            
   Last activity: 04/21/15 12:15:22               Poll interval:   3 minutes   
                                                                               
 ________    Date CCYYMMDD                                                     
                                                                               
  Time Stamp                   File                                       Recs 
2015-04-21-12.01.58.501000     5_dist_74422911_6uxyup0.dist                  5 
2015-04-21-12.01.58.481000     5_dist_74422911_6uxyhg0.dist                  3 
2015-04-21-11.49.12.405000     5_dist_74422911_6uxy5h0.dist                  2 
2015-04-21-11.49.12.376000     5_dist_74422911_6uxxvf0.dist                  1 
2015-04-21-11.49.12.354000     5_dist_74422911_6uxxv40.dist                  1 
2015-04-21-11.49.12.168000     5_dist_74422911_6uxxr70.dist                  3 
2015-04-21-11.49.12.145000     5_dist_74422911_6uxxop0.dist                  5 
2015-04-21-11.49.12.131000     5_dist_74422911_6uxxen0.dist                  7 
2015-04-21-11.49.12.109000     5_dist_74422911_6uxx0o0.dist                  1 
2015-04-21-11.49.12.091000     5_dist_74422911_6uxwsj0.dist                  5 
2015-04-21-11.49.12.043000     5_dist_74422911_6uxwm40.dist                  1 
                                                                               
 F3=Exit   F5=Refresh                      F8=End Mon   F9=Poll Now            
 F13=Config                      F15=Atlas Messages F16=W/W Mon Job   F12=Exit 
       

Press F13 Configuration, and press page down.

WORK WITH DATA IN A FILE                       Mode . . . . :   CHANGE         
Format . . . . :   ATLCONFR                    File . . . . :   ATLCONFP       
                                                                               
*RECNBR:                   1                                                   
ATLCARR:            ___                                                           
ATLSROM:            ___                                                           
FTP Server:         ftpmailbox1.etrac.net                                      
FTP User ID:        97412433                                                   
FTP Password:       ObEjFist                                                   
FTP Directory:      in_ready                                                   
UWD FTP Svr:        mail.unipharm.local                                        
UWD FTP User ID:    atlas                                                      
UWD FTP Pwd:        65gJ2V                                                     
UWD FTP Dir:        _______________                                                           
Monitor JOBQ:       MONITOR2                                                   
Monitor JOBQ Lib:   *LIBL                                                      
Monitor Job Name:   ATLAS_INT                                                  
Monitor Poll Wait:    3                                                        
Monitor Poll Pause:  20                                                        
Prt FTP Logs:       N                                                          
                                                                               
F3=Exit                 F5=Refresh               F6=Select format              
F9=Insert               F10=Entry                F11=Change                    

Change the bottom entry, ‘Print FTP Logs’ to ‘Y’ (make sure it’s upper case). Then you can look at the spool files for the job.

                                                   Display Spooled File
File  . . . . . :   QPQUPRFIL                                                                      Page/Line   3/15          
Control . . . . .   B                                                                              Columns     1 - 80        
Find  . . . . . .    
*...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8        
150 Opening BINARY mode data connection for 5_dist_74422911_6uxxv40.dist (205 Bytes).                                      
226 Transfer complete. 205 bytes transferred. 0.20 KB/sec. 
205 bytes transferred in 0.050 seconds. Transfer rate 4.116 KB/sec. 
Enter an FTP subcommand.                        
> get 5_dist_74422911_6uxxvf0.dist UWDASWPRDD/ATDOWNP.AT16 (Replace 
200 PORT command successful.                           
150 Opening BINARY mode data connection for 5_dist_74422911_6uxxvf0.dist (235 Bytes).                                      
226 Transfer complete. 235 bytes transferred. 0.23 KB/sec.
235 bytes transferred in 0.057 seconds. Transfer rate 4.149 KB/sec. 
Enter an FTP subcommand.                            
> get thumbs.db UWDASWPRDD/ATDOWNP.AT17 (Replace 
200 PORT command successful.               
450 Cannot open file /thumbs.db for reading.
Enter an FTP subcommand.                            
> quit                   
221 Goodbye, closing session.    
* * *  E N D  O F  R E P O R T  * * *   

This shows the file that has been (incorrectly) sent by Atlas.

Missing Loomis Invoices

If the invoices are not on the FTP server, check to see if they are available on the web site. http://loomis-express.com/webship/

Click on ‘Access The Billing Centre’.

User name is accountspayable@unipharm.com Password is UWDMU7048

Click on ‘View Your Invoice’.

Find the missing invoices for any of the three accounts (MU7048, MV5873, and 4204196 – which replaces TF9094), and download them in CSV.

Move them into your folder in staging on SuperServer.

From a command line in production ASW, run – (where ‘invoice3.csv’ is the name of the file).

CPYFRMIMPF FROMSTMF('qntc/superserver/staging/sheilav/invoice3.csv') TOFILE(UWDASWPRDD/CIINVFILEP) MBROPT(*REPLACE) RCDDLM(*CRLF) RPLNULLVAL(*FLDDFT)

  • Note that although this command will work, you will get an error because the headings cannot map into the data base file.

Then run this program to update the carrier invoice and waybill files.

CALL PGM(CIRINV09) PARM('DHL' '                            ')   

The next step is to make sure that if these invoices do get onto Loomis’ ftp server that we don’t update them a second time. Go to -

Unity / Start uniPHARM Extensions / VA Company / Work with UWD IT Tools / FTP Connections / Carrier Invoice FTP Config.

Press page down until you see the the record for Loomis (which used to be called DHL) for the applicable account.

WORK WITH DATA IN A FILE                       Mode . . . . :   CHANGE         
Format . . . . :   CIINVFTR                    File . . . . :   CIINVFTPP      
                                                                               
Carrier:            DHL                                                        
Sequence:           1                                                          
Description:        DHL Richmond General Account                               
FTP Server:         ebilling.loomis-express.com                                
FTP User ID:        mv5873                                                     
FTP Password:       6001004                                                    
FTP Directory:      MU7048                                                     
Last File Trans:    MU7048_5323174.csv                                         
Next Sequential #:  1365                                                       
Archive Folder:     ______________________________                                                           
Processing Program: CICINV09                                                   
                                                                               

We have to update the ‘Last file transmitted’. We can’t move or delete files on this server, so we have to make sure we only pick up each invoice once – if Loomis restarts their invoice number series this will break, and we will have to get them to delete all old invoices.

Repeat this for the accounts of any invoices manually downloaded.

Waybills Missing Customer Number

Returns from the stores to uniPHARM are sometimes manual waybills, so they do not have a customer number. When we receive them, the program attempts to figure it out, but is not always successful. The more accurate we make this file, the better the decisions based on it are.

To find waybills that are missing a customer number, select a date range, and key in ‘y’ for ‘include blank cust # only’, and press search. Sort the customer name column so that records for the same customer can be corrected at the same time (you will only have to determine the correct partner number once).

Click on the waybill number to display the detail. In the ‘Select Partner’ box, key in parts of the ‘Pickup From’ name and/or address. When an entry with a matching address shows, click on it, then ‘update’ and ‘go back’.

There is a problem with the Loomis (DHL) data, in that when they cannot determine the customer number, they sometimes put in the first one on the file; which is ‘10005’. So filter waybills by customer 10005, and correct any that not say “Aaronson’s” for the name. Sort by customer name to identify these easier. Click on customer name again to reverse the sort order to find more that are not for Aaronson's.