Welcome to JRI's Help page for building SFTP and/or Samba control records

We now have a table driven way to run SFTP commands and/or Samba commands. To do this, you need a master control in DSCTBL, which in turn contains a list of SFTP.CTL keys. Each one of the SFTP.CTL keys refers to a specific file to be processes (using SFTP, Samba or both). Note that with the Samba part, you can:

  • Put the file in multiple places
  • Append a date stamp
  • Append a date/time stamp
  • Put in different places between LIVE and non-LIVE

These are all driven by the program SYSS9100.2 and have the following TCL syntax:

  • SYSS9100.2 DSCTBL_key
  • or
  • SYSS9100.2 DSCTBL_key DLDATA_key1
  • or
  • SYSS9100.2 DSCTBL_key $DLDATA_key$2 naming style3
1 where the file being moved via SAMBA is in DLDATA using the expected TEMP.port name.
2 where the file being moved via SAMBA is in DLDATA and is specifically named within the dollar signs (ex. $ADP_Employee.txt$).
3 where the file being moved via SAMBA is in DLDATA and is specifically named within the dollar signs and the file is re-named/moved as follows:
Naming Style Environment Effect
0 or null LIVE4
TRN
DEV
DR
Put in "root" folder
Put in "TRN" sub-folder
Put in "DEV" sub-folder
Put in "DR" sub-folder
1 LIVE4
TRN
DEV
DR
Put in "root" folder
Put in "root" folder - append "TRN" to file name
Put in "root" folder - append "DEV" to file name
Put in "root" folder - append "DR" to file name
2 LIVE4
TRN
DEV
DR
Put in "LIVE" sub-folder
Put in "TRN" sub-folder
Put in "DEV" sub-folder
Put in "DR" sub-folder
4 Note that "LIVE" accounts are controled by ACCOUNT.INFO - most likely just LIVE.DATA and EPORTAL - other accounts in the "LIVE" realm are treated as if they were in TRN.

Note that SYSS9100.2 will call

  • SYSS9002.3 for SFTP logic
  • SYSS9100.1 for Samba logic

Let's get started...

The DSCTBL master control record is simply a list of individual SFTP.CTL keys, each of which is its own set of SFTP and/or SAMBA commands/controls.

If you wish to handle multiple commands, you simply have 1 SFTP.CTL key for each file.

Any line that begins with an asterisk is considered a comment. Thus, you could disable the entire job by having each line begin with an asterisk.

Below is an example of a multi-command DSCTBL record:

ED DSCTBL ADP.DOWNLOADS
001: * This is a multi-field record of SFTP.CTL records to execute
002: ADP.AD.CERTS
003: ADP.AD.EMPS
004: ADP.AD.LOCS
To launch these three pulls above, you simple type:
SYSS9100.2 ADP.DOWNLOADS

Each SFTP.CTL record is designed to issue a specific SFTP command, SAMBA command or both. Fields 2 through 10 are for SFTP actions (F7 - F10 are for future development) and fields 11 through 20 are for SAMBA (F16 - F20 are for future use).

Field Purpose
F1 DESC - A comment about the purpose of the control record so you have a clue what it is trying to do

SFTP

SYSS9002.3 is called to perform SFTP logic
Field Purpose
F2 CONNECTION - This is the userID@domain used to connect to the FTP site.
Note that this must be established before you can make this connection.
Note the userID can have spaces (like Dayton Superior@sftp...) - in this case the userID and site must be encase in double quotes.
See Bruce about getting the key exchange authenticated.
F3 COMMANDS - This is a multi-valued list of SFTP commands that will be issued once the connection has been made.
Note that if the file name being acted upon is dynamic (such as the GL download from ADP that has a different batch number in the name), use $FILENAME$ in the control record and use a CHANGE command to alter it.
Another reason to use $FILENAME$ is if an Avante program is using the SFTP.CTL record and you want to keep the storage of the file name in just 1 place (the program). An example of this is SFCS9017.2. SFCS9017.2 needs the file name for other reasons, so rather than have it in 2 places (the program and the SFTP.CTL record), it is only hard-coded in the program and passed to SYSS9002.3 via OPTIONS<1, 22> (see Example). See BP GLMS9014.1 for more details as to how the above SFTP.CTLs are used, $FILENAME$ is changed, etc.
Note that the SFTP commands can be any valid commands.
The following 3 SFTP.CTLs are used by GLMS9014.1 (ADP query, get, remove) to:

  • Query the files on ADP's GL FTP site, GLMS9014.1:
    • OPTIONS = ""
    • OPTIONS<1, 9> = 0 ;* do not display CRTs
    • OPTIONS<1, 22> = "ADP.GL.QUERY"
    • CALL SYSS9002.3(DLDATA.KEY, FILE.PREFIX, FTP.TO, FTP.PASSWORD, DATE.TIME, OPTIONS, SFTP.RESULTS, FUTURE3)
    ED SFTP.CTL ADP.GL.QUERY
    001: QUERY ADP'S GL SFTP SITE
    002: dsupADPGL@sdgcl.adp.com
    003: cd OUTBOUND^253ls -la^253quit
  • GLMS9014.1 scrubs the SFTP.RESULTS, and displays the results allowing the user to pick the filename to download.
  • To download the chosen file from ADP's web site, we need to pass the filename to SYSS9002.3 as follows:
    • OPTIONS = ""
    • OPTIONS<1, 9> = 0 ;* do not display CRTs
    • OPTIONS<1, 22> = "ADP.GL.GET"
    • OPTIONS<1, 23> = filename
    • CALL SYSS9002.3(DLDATA.KEY, FILE.PREFIX, FTP.TO, FTP.PASSWORD, DATE.TIME, OPTIONS, SFTP.RESULTS, FUTURE3)
    If OPTIONS<1, 23> is not null, then SYSS9002.3 replaces $FILENAME$ with the value in OPTIONS<1, 23>.
    ED SFTP.CTL ADP.GL.GET
    001: GET EMPLOYEE FILE FROM ADP'S FTP SITE
    002: dsuppsftpADPR@sdgcl.adp.com
    003: cd OUTBOUND^253lcd /vol1/prod/work^253get $FILENAME$^253quit
  • If you wish to delete a file from an FTP site, the SFTP.CTL record could look like this:
    • OPTIONS = ""
    • OPTIONS<1, 9> = 0 ;* do not display CRTs
    • OPTIONS<1, 22> = "ADP.GL.GET">
    • OPTIONS<1, 23> = filename>
    • CALL SYSS9002.3(DLDATA.KEY, FILE.PREFIX, FTP.TO, FTP.PASSWORD, DATE.TIME, OPTIONS, SFTP.RESULTS, FUTURE3)>
    ED SFTP.CTL ADP.GL.REMOVE
    001: REMOVE THE FILE FROM ADP'S SFTP SITE
    002: dsupADPGL@sdgcl.adp.com
    003: cd OUTBOUND^253rm $FILENAME$^253quit
  • Note that these examples only do SFTP commands - no Samba stuff.
F4 WINDOW - This is an optional field and is only used if the SFTP commands are doing a "get".
If you want to test how old the file is on the FTP site prior to downloading it, enter a letter and number where
Factor Window Duration
M # of minutes
H # of hours
D # of days
W # of weeks

ED SFTP.CTL ADP.AD.CERTS
001: Download Certification Codes from ADP for Active Directory
002: dsuppsftpADPR@sdgcl.adp.com
003: cd OUTBOUND^253lcd EDI.EDI.EE^253get $FILENAME$^253quit
004: H6
005: PESASM
006: ADP
In this case, if the file is found to be older than 6 hours, a warning Email will go to PESASM (plus IT).
If this field has a value, the logic will:
  • Back-up the desired batch file
  • Parse through the batch file looking for the "get" command
  • When found, it will
    • Extract the file name from the line with the "get" command
    • Replace the entire line with a "ls -la" command
  • Remove unwanted commands
  • Execute the new SFTP/batch file capturing the results
  • Pares through the results looking for the line with the desired file name
  • Extract the date/time stamp
  • Determine if the file is too old or not
  • Restore the batch file from the backed up copy
F5 RECIPIENTS - If the file is determined to be too old (or missing), it will send an Email to this people (plus IT).
It is only used if F4 is used and there is a problem.
F6 NAME - This is simply the name of the company being contacted & is only used in the text of the error Emails.
It is only used if F4 is used and there is a problem.
F7 ALLOW.OLD - This works with F4 (WINDOW). If a file is determined to be outside the acceptable window/time-frame, should the file continue to be processes? There are 3 possible conditions (each of which is reflectd in the Email):
  1. It is within the acceptable window - no special action taken
  2. It is not within the acceptable window - special action may be needed
    • Background job - do not process the file!!!
    • Manually run - process the file
      • Debugging or
      • Processing files that were late


SAMBA

SYSS9100.1 is called to perform Samba logic

Fields 11 through 15 are for Samba commands. Some are required (11 & 12) while others are optional.

Field Purpose
F11 BUILD.OPTIONS - This is a multi-valued list of options that will be used in the CASE statement in SYSS9100.1 (common Samba command builder).
For each type of Samba "put", you will have a multi-value.
F12 DESTINATIONS - An associated multi-valued/sub-valued "put" location, this field stores where the logic should "put" the resulting file.

  • The 1st sub-value is where the file goes from the LIVE account
  • The 2nd sub-value is where the file goes from non-LIVE accounts
  • If the 2nd sub-value is blank, the logic will default to the 1st (LIVE) sub-value
Note that Samba connections use two parts to generate the full destination path (a connect point and a sub-directory path).
These should be seperated by a pipe ("|").
F13 STAMPS - This is a multi-valued flag associated with F11 & F12 used to determine if a stamp should be added to the end of the filename.
Each multi-value can have any combination of the following options (and they are appended to the file name in this order):

  • null (no stamp)
  • R - a realm abbreviation (_DEV or _TRN)
  • D - a date stamp (_YYYYMMDD)
  • T - a time stamp (_HHMMSS)
Note that a realm stamp will automatically be added for non-LIVE accounts (as defined in EPORTAL.BP ACCOUNT.INFO) if a non-live file is going to a location shared by all accounts. See description of F12 and the population of the sub-values (or not).
For example, a control record that does both SFTP and Samba could look like:
ED SFTP.CTL ADP.LABOR.EFF
001: Download ADP Labor Efficentcy and put on servers
002: dsuppsftpADPR@sdgcl.adp.com
003: cd OUTBOUND^253lcd EDI/EDI.EE^253get DaytonSuperior_LaborEfficiency.csv^253quit
004:
005:
006:
007:
008:
009:
010:
011: 3^25316
012: Finance/ADP^253//mbdatastgprod01/BI|SourceFiles/Others^252//mbdatastgdev01/BI|SourceFiles/Others
013: D^253
  • SFTP stuff (fields 2-3):
    • Connect to dsuppsftpADPR@sdgcl.adp.com
      • cd OUTBOUND (on the sftp site)
      • lcd EDI/EDI.EE (local cd to EDI/EDI.EE)
      • get DaytonSuperior_LaborEfficiency.csv (copy the file from FTP site to EDI/EDI.EE)
      • quit
  • Samba stuff (fields 11-13)
    • copy EDI/EDI.EE/DaytonSuperior_LaborEfficiency.csv to G:/Finance/ADP/DaytonSuperior_LaborEfficiency_YYYYMMDD.csv
    • copy EDI/EDI.EE/DaytonSuperior_LaborEfficiency.csv to //mbdatastgprod01/BI/SourceFiles/Others/DaytonSuperior_LaborEfficiency.csv (live) or
    •     copy EDI/EDI.EE/DaytonSuperior_LaborEfficiency.csv to //mbdatastgdev01/BI/SourceFiles/Others/DaytonSuperior_LaborEfficiency.csv (non-live)
By default, it will look for the file based on the location/file name specified in the SFTP logic. In a case where we are not doing any SFTP stuff (and thus have no location/file name info), we need to define that info in fields 14 and 15 (see below).
F14 UNIX.DIR - This is an semi-optional field. It defines the directory path where the file can be found (usually ../../dldata/ but could be any UNIX path). It is required if there were no SFTP commands, otherwise it will use the path from the "lcd" command in F3.
F15 FILENAME - This is an semi-optional field. It is the file name that you want to end up using. It is required if there were no SFTP commands, otherwise it will use the file name from the "get" command in F3.
In this example, the original file is not being pulled in from an FTP site.
Instead, it was build by an Avante program (in this case SFCS9029.1) and stored in DLDATA using the default logic in SYSS9002.1 to set DLDATA.KEY.
Once the export has been built in DLDATA, we execute the following command:
STMT = "SYSS9100.2 AV.LABOR.EARNED ":DLDATA.KEY
CRT STMT
EXECUTE STMT
Since there are no SFTP commands (field 32 & 3), we need to define where the file is located (F14) and the name we want to ultimately call the file (F15).
ED SFTP.CTL AV.LABOR.EARNED
001: Move Avante Labor Earned Download (SFCS9029.1) results from DLDATA to various network locations - only used if sched
002:
003:
004:
005:
006:
007:
008:
009:
010:
011: 3^25316
012: Finance/ADP^253//mbdatastgprod01/BI|SourceFiles/Avante^252//mbdatastgdev01/BI|SourceFiles/Avante
013: D^253
014: ../../dldata/
015: Avante_Labor_Earned_Download.txt
  • Samba stuff (fields 11-15)
    • copy EDI/EDI.EE/DaytonSuperior_LaborEfficiency.csv to G:/Finance/ADP/DaytonSuperior_LaborEfficiency_YYYYMMDD.csv
    • copy EDI/EDI.EE/DaytonSuperior_LaborEfficiency.csv to //mbdatastgprod01/BI/SourceFiles/Others/DaytonSuperior_LaborEfficiency.csv (live) or
    •     copy EDI/EDI.EE/DaytonSuperior_LaborEfficiency.csv to //mbdatastgdev01/BI/SourceFiles/Others/DaytonSuperior_LaborEfficiency.csv (non-live)

In some cases, we just want to do a straight SFTP set of commands w/o any SAMBA and without the overhead of also running SYSS9100.2. In this case, we can simply populate OPTIONS, call SYSS9002.3, then react accordingly.

An example of this is SFCS9017.2 (download employee/shift data from ADP). In this case, our BP code would look something like this:

  • ADP.FILENAME = "ADP_AvanteEEOrgInfo_V2.txt" ;* Predefined to be reused later in program
  •  
  •  
  • DLDATA.KEY = ""
  • FILE.PREFIX = ""
  • FTP.TO = "" ;* Determined by control record
  • FTP.PASSWORD = "" ;* Determined by control record
  • DATE.TIME = ""
  • OPTIONS = ""
  • OPTIONS<1, 9> = 0 ;* do not display CRTs
  • OPTIONS<1, 21> = "ADP.EE.GET" ;* SFTP.CTL.KEY control record
  • OPTIONS<1, 22> = ADP.FILENAME ;* File name to get from ADP
  • FUTURE3 = ""
  • CALL SYSS9002.3(DLDATA.KEY, FILE.PREFIX, FTP.TO, FTP.PASSWORD, DATE.TIME, OPTIONS, SFTP.RESULTS, FUTURE3)
  • ERROR.MSG = OPTIONS<1, 30>
ED SFTP.CTL ADP.EE.GET
001: GET EMPLOYEE FILE FROM ADP'S FTP SITE
002: dsuppsftpADPR@sdgcl.adp.com
003: cd OUTBOUND^253lcd EDI/EDI.EE^253get $FILENAME$^253quit
The code would now need to know how to react if things worked (or not).

As of the last update (01/15/15), here are the processes that use this new logic:

  • ADP.DOWNLOADS (cron job - download 4 ADP files to K drive)
    Certification_Codes_for_AD.txt
    Employee_Data_for_AD.txt
    Location_List_for_AD.txt
    NONUSA_Employees_for_AD.txt
    Employee_Misc_for_AD.txt
    • ADP.DOWNLOADS.INPUTS (cron job inputs)
      • SYSS9100.21 ADP.DOWNLOADS (DSCTBL with 5 SFTP.CTL keys) ⇐ TCL Command
        • SYSS9002.32 #1 (Does the actual SFTP logic)
          • ADP.AD.CERTS (SFTP.CTL)
            • Download Certification Codes from ADP for Active Directory
              ADP Source Avante Network Path
              OUTBOUND/Certification_Codes_for_AD.txt EDI/EDI.AD/Certification_Codes_for_AD.txt K:\MIS\DLL\Certification_Codes_for_AD_DEV7.txt
        • SYSS9002.32 #2 (Does the actual SFTP logic)
          • ADP.AD.EMPS (SFTP.CTL)
            • Download Employee Date from ADP for Active Directory
              ADP Source Avante Network Path
              OUTBOUND/Employee_Data_for_AD.txt EDI/EDI.AD/Employee_Data_for_AD.txt K:\MIS\DLL\Employee_Data_for_AD_DEV7.txt
        • SYSS9002.32 #3 (Does the actual SFTP logic)
          • ADP.AD.LOCS (SFTP.CTL)
            • Download Location List from ADP for Active Directory
              ADP Source Avante (UNIX) Network Path
              OUTBOUND/Location_List_for_AD.txt EDI/EDI.AD/Location_List_for_AD.txt K:\MIS\DLL\Location_List_for_AD_DEV7.txt
        • SYSS9002.32 #4 (Does the actual SFTP logic)
          • ADP.AD.NONUSA (SFTP.CTL)
            • Download non-USA people from ADP for Active Directory
              ADP Source Avante (UNIX) Network Path
              OUTBOUND/NONUSA_Employees_for_AD.txt EDI/EDI.AD/NONUSA_Employees_for_AD.txt K:\MIS\DLL\NONUSA_Employees_for_AD_DEV7.txt
        • SYSS9002.32 #5 (Does the actual SFTP logic)
          • ADP.AD.MISC (SFTP.CTL)
            • Download misc. info from ADP for Active Directory
              ADP Source Avante (UNIX) Network Path
              OUTBOUND/Employee_Misc_for_AD.txt EDI/EDI.AD/Employee_Misc_for_AD.txt K:\MIS\DLL\Employee_Misc_for_AD_DEV7.txt
  • ADP.PREMP.LOAD (cron job - download 1 ADP file and re-builds data in PREMP)
    ADP_AvanteEEOrgInfo_V2.txt
    • ADP.PREMP.LOAD.INPUTS (cron job inputs)
      • SFCS9017.1 (simply calls SFCS9017.2) ⇐ TCL Command
        • SFCS9017.3 (does the real work)
            ADP Source Avante (UNIX) Avante
            OUTBOUND/ADP_AvanteEEOrgInfo_V2.txt EDI/EDI.EE/ADP_AvanteEEOrgInfo_V2.txt Re-builds the PREMP data
  • ADP.LABOR.EFF (cron job - download 1 ADP file and put on G drive and BI server)
    DaytonSuperior_LaborEfficiency.csv
    • ADP.LABOR.EFF.INPUTS (cron job inputs)
      • SYSS9100.21 ADP.LABOR.EFF (DSCTBL with 1 SFTP.CTL key) ⇐ TCL Command
        • SYSS9002.32 (Does the actual SFTP logic)
          • ADP.LABOR.EFF (SFTP.CTL)
            • Download ADP Labor Efficiency and put on servers
              ADP Source Avante (UNIX) Network Path
              OUTBOUND/DaytonSuperior_LaborEfficiency.csv EDI/EDI.EE/DaytonSuperior_LaborEfficiency.csv G:\Finance\ADP\DaytonSuperior_LaborEfficiency_DEV7_YYYYMMDD.csv
              //mbdatastgprod018/BI/SourceFiles/Others/DaytonSuperior_LaborEfficiency.csv
  • AV.LABOR.EARNED (cron job - build Avante file and put on G drive and BI server)
    Built from Avante - not a download
    • AV.LABOR.EARNED.INPUTS (cron job inputs)
      • SFCS9029.13 (Driver program to export Labor from Avante) Need to run as cronuser to push to other drives ⇐ TCL Command
        • EXECUTE "SYSS9100.21 AV.LABOR.EARNED (SFTP.CTL) DLDATA key4"
          • SYSS9002.32 (Does the actual SFTP logic)
            • Download ADP Labor Efficiency and put on servers
              ADP Source Avante (UNIX) Network Path
              n/a DLDATA/TEMP.port# G:\Finance\ADP\Avante_Labor_Earned_Download_DEV7_YYYYMMDD.txt
              //mbdatastgprod018/BI/SourceFiles/Avante/Avante_Labor_Earned_Download.txt
  • ADP.FSA (cron job - download 1 ADP file and load into Avante PREMP)
    FSA.txt
    • ADP.FSA.INPUTS (cron job inputs)
        • SYSS9100.21 ADP.FSA (DSCTBL with 1 SFTP.CTL key) ⇐ TCL Command
          • SYSS9002.32 (Does the actual SFTP logic)
            • ADP.FSA (SFTP.CTL)
              • Download ADP FSA file and put on servers
                ADP Source Avante (UNIX) Network Path
                OUTBOUND/FSA.txt EDI/EDI.EE/FSA.txt G:\Reports_Browzer\ADP_Payroll\V_FSA-Weekly\FSA_YYYYMMDD.txt
  • ADP.HEADCOUNT (cron job - download 1 ADP file and move to Data Stage - //daydatastg01)
    BI_Headcount.txt
    • ADP.HEADCOUNT.INPUTS (cron job inputs)
        • SYSS9100.21 ADP.HEADCOUNT (DSCTBL with 1 SFTP.CTL key) ⇐ TCL Command
          • SYSS9002.32 (Does the actual SFTP logic)
            • ADP.HEADCOUNT (SFTP.CTL)
              • Download ADP HEADCOUNT file and put on servers
                ADP Source Avante (UNIX) Network Path
                OUTBOUND/BI_Headcount.txt EDI/EDI.EE/BI_Headcount.txt \\daydatastg01\BI\SourceFiles\Others\BI_Headcount.txt
  • GLM9014 (Manual job - query/get/delete GL data from ADP's FTP site & load Avante LBRREG)
    • GLMS9014.1 (BP that does all the work) ⇐ TCL Command
      • CALL SYSS9002.32 (Does the actual SFTP logic) passing SFTP.CTL ADP.GL.QUERY via OPTIONS<1, 21>
        • Connects to FTP site and does a ls -la command to query the remote directory
          Parse the results and write to TNN
          Runs GLMX9014.1 to give the user a lookup of the contents of TNN to pick the $FILENAME$ to download
          ADP Source Avante (UNIX) Network Path
          OUTBOUND/ TNN n/a
      • CALL SYSS9002.32 (Does the actual SFTP logic) passing SFTP.CTL ADP.GL.GET via OPTIONS<1, 21> & passing the selected $FILENAME$ via OPTIONS<1, 22>
        • Get GL data from ADP to populate LBRREG
          ADP Source Avante (UNIX) Network Path
          OUTBOUND/$FILENAME$ EDI/EDI.GL/$FILENAME$
          LBRREG
          n/a
      • CALL SYSS9002.32 (Does the actual SFTP logic) passing SFTP.CTL ADP.GL.REMOVE via OPTIONS<1, 21> & passing the selected $FILENAME$ via OPTIONS<1, 22>
        • Connects to FTP site and does a rm command to remove/delete $FILENAME$
          ADP Source Avante (UNIX) Network Path
          OUTBOUND/$FILENAME$ n/a n/a
  • VOYA.SEND (cron job - download 1 ADP file then push to VOYA's server)
    692867_DIAL_DaytonSuperiorCorporation_ADP_.csv
    • VOYA.SEND.INPUTS (cron job inputs)
      • SYSS9152.1 (VOC to run) ⇐ TCL Command
        • SYSS9100.2 ADP.VOYA.PULL.LIVE (Does the actual SFTP get from ADP to DSC)
          • ADP.VOYA.PULL.LIVE (DSCTBL record with 1 SFTP.CTL key)
            • ADP.VOYA.PULL.LIVE (SFTP.CTL control record with steps to execute - or NONLIVE)
              • Connects to ADP's FTP site
              • Executes the following to get the file:
                • cd OUTBOUND
                • lcd EDI/EDI.AD
                • get 692867_DIAL_DaytonSuperiorCorporation_ADP_.csv (or TESTDIAL if not LIVE)
                • quit
        • Add date stamp to file name
        • SYSS9100.2 ADP.VOYA.PUSH.LIVE (Does the actual SFTP put from DSC to Voya)
          • ADP.VOYA.PUSH.LIVE (DSCTBL record with 1 SFTP.CTL key)
            • ADP.VOYA.PUSH.LIVE (SFTP.CTL control record with steps to execute - or NONLIVE)
              • Connects to Voya's FTP site
              • Executes the following to put the file:
                • cd FilesToVoya
                • lcd EDI/EDI.AD
                • put 692867_DIAL_DaytonSuperiorCorporation_ADP_YYYYMMDD.csv (or TESTDIAL if not LIVE)
                • quit
  • TROWPRICE.SEND (cron job - download 1 ADP file then push to T Row Price's server)
    XOB05003.dat
    • TROWPRICE.SEND.INPUTS (cron job inputs)
      • SYSS9160.1 (VOC to run) ⇐ TCL Command
        • SYSS9100.2 ADP.TROWPRICE.PULL.LIVE (Does the actual SFTP get from ADP to DSC)
          • ADP.TROWPRICE.PULL.LIVE (DSCTBL record with 1 SFTP.CTL key)
            • ADP.TROWPRICE.PULL.LIVE (SFTP.CTL control record with steps to execute - or NONLIVE)
              • Connects to ADP's FTP site
              • Executes the following to get the file:
                • cd OUTBOUND
                • lcd EDI/EDI.AD
                • get XOB05003.dat (or TOB05003.dat if not LIVE)
                • quit
        • SYSS9100.2 ADP.TROWPRICE.PUSH.LIVE (Does the actual SFTP put from DSC to T Row Price)
          • ADP.TROWPRICE.PUSH.LIVE (DSCTBL record with 1 SFTP.CTL key)
            • ADP.TROWPRICE.PUSH.LIVE (SFTP.CTL control record with steps to execute - or NONLIVE)
              • Connects to T Row Price's FTP site
              • Executes the following to put the file:
                • lcd EDI/EDI.AD
                • put XOB05003.dat (or TOB05003.dat if not LIVE)
                • quit
  • HARTFORD.SEND (cron job - download file from ADP's FTP site then push to Hartford's FTP site)
    DSC_Hartford_.txt
    • HARTFORD.SEND.INPUTS (cron job inputs)
      • SYS9152.3 (VOC to run) ⇐ TCL Command
        • SYSS9100.2 ADP.HARTFORD.PULL (Does the actual SFTP get from ADP to DSC)
          • ADP.HARTFORD.PULL (DSCTBL record with 1 SFTP.CTL key)
            • ADP.HARTFORD.PULL (SFTP.CTL control record with steps to execute
              • Connects to ADP's FTP site
              • Executes the following to get the file:
                • cd from
                • lcd EDI/EDI.BENEFIT
                • get DSC_Hartford_.txt
                • quit
        • SYSS9100.2 ADP.HARTFORD.PUSH (Does the actual SFTP push from DSC to HARTFORD)
          • ADP.HARTFORD.PUSH (DSCTBL record with 1 SFTP.CTL key)
            • ADP.HARTFORD.PUSH (SFTP.CTL control record with steps to execute
              • Connects to HARTFORD's FTP site
              • Executes the following to push the file:
                • cd /Upload/Users/mft
                • lcd EDI/EDI.BENEFIT
                • put DSC_Hartford_mmddyyyy.txt
                • quit
        • SYSS9100.2 ADP.HARTFORD.PURGE (Does the actual SFTP purge from ADP)
          • ADP.HARTFORD.PURGE (DSCTBL record with 1 SFTP.CTL key)
            • ADP.HARTFORD.PURGE (SFTP.CTL control record with steps to execute
              • Connects to ADP's FTP site
              • Executes the following to purge the file:
                • cd fromADP
                • rm DSC_Hartford_.txt
                • quit
  • EHS_EMPLOYEES (cron job - download file from ADP's FTP site, push to Srini's site, then delete from ADP's FTP site)
    EHS_Employees.TXT
    • EHS_EMPLOYEES.INPUTS (cron job inputs)
      • SYS9152.4 (VOC to run) ⇐ TCL Command
        • SYSS9100.2 EHS_EMPLOYEES.PULL (Does the actual SFTP get from ADP to DSC)
          • EHS_EMPLOYEES.PULL (DSCTBL record with 1 SFTP.CTL key)
            • EHS_EMPLOYEES.PULL (SFTP.CTL control record with steps to execute
              • Connects to ADP's FTP site
              • Executes the following to get the file:
                • cd fromADP
                • lcd EDI/EDI.BENEFIT
                • get EHS_Employees.txt
                • quit
          • Samba stuff (fields 11-13)
            • copy EDI/EDI.BENEFIT/EHS_Employees.txt to //daydatastg/BI/SourceFiles/Avante/EHS_Employees.txt (live) or
            • copy EDI/EDI.BENEFIT/EHS_Employees.txt to //daydatastg/BI/SourceFiles/Avante/EHS_Employees.txt (non-live - same as LIVE)
        • SYSS9100.2 EHS_EMPLOYEES.PURGE (Deletes teh file from ADP's FTP site)
          • EHS_EMPLOYEES.PURGE (DSCTBL record with 1 SFTP.CTL key)
            • EHS_EMPLOYEES.PURGE (SFTP.CTL control record with steps to execute
              • Connects to ADP's FTP site
              • Executes the following to remove/delete the file:
                • cd fromADP
                • rm EHS_Employees.txt
                • quit
1 SYSS9100.2 loops through the contents of the DSCTBL record and calls SYSS9002.32 for SFTP logic and/or SYSS9100.16 to build Samba command (but not actually executes Samba).
2 SYSS9002.3 is the subroutine that actually does all the true SFTP logic based on the SFTP.CTL key passed to it (plus other factors).
3 SFCS9029.1 builds an Avante export of labor earned in DLDATA (thus no SFTP logic), then EXECUTEs SYSS9100.2 using the DLDATA key as an option.
4 If a file is build directly in Avante, it will likely be build in DLDATA - Simply pass the DLDATA key as the 2nd parameter when executing SYSS9100.21.
5 SFCS9017.3 does a bunch of other work, but at some point calls SYSS9002.3 directly to do the actual SFTP logic.
6 SYSS9100.1 builds a Samba command bassed on passed parameters but does not actually execute the command.
7 If LIVE, there is no name change - otherwise _DEV, _TRN or _DR is added to the file name.
8 If LIVE, write to mbdatastgprod01 otherwise write to mbdatastgdev01.
9 This is a file name in dldata - it must be enclosed in dollar signs ("$").
10 If LIVE, the file goes to the root dir - otherwise it goes to a sub-folder DEV, TRN or DR.
Note that this can be run from SFC9003, TCL or from TCL as cronuser - if run as cronuser, it uses Samba to put the files on servers, otherwise it is sent as an Email to the user.