Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 5

1.

Test Cases for SNB6800 Program and TASN6800 Job

Test Case 1: Create Vendor ASN File to Send to Ascenda (JSTP010)

Pre-conditions:

 There are ASNs in the database that have not been interfaced yet (interface=' ') and have
a status of 'CR', 'RC', 'CK', or 'RL'.
 The user wants to extract ASNs for all entities (direct, retail, or both).
 The user wants to include ASNs with missing PO line numbers in the vendor ASN file (JP-
PARM-MISSING-PO-RC='Y').

Test Steps:

1. Submit the TASN6800 job with JCL parameter JP-PARM-ENTITY set to 'BOTH' and JP-
PARM-MISSING-PO-RC set to 'Y'.
2. The SNB6800 program will execute and extract ASNs for both direct and retail entities.
3. The program will include ASNs with missing PO line numbers in the vendor ASN file
(TASNP.TASN6800.VENDOR.ASNS).
4. The program will update the 'interfaced' column in the TSNASN table to 'V' for each
extracted ASN.
5. The program will update the 'CANCEL_CODE' column in the TSNASR table to 'Y' for
each extracted ASN's sub-receipt number.

Expected Results:

 The TASN6800 job should complete successfully with a return code of 0.


 The TASNP.TASN6800.VENDOR.ASNS file should be created and contain vendor ASN
records for both direct and retail ASNs, including those with missing PO line numbers.
 The 'interfaced' column in the TSNASN table should be updated to 'V' for each extracted
ASN.
 The 'CANCEL_CODE' column in the TSNASR table should be updated to 'Y' for each
extracted ASN's sub-receipt number.

Data Used in Test:

 TSNASN table with ASNs having ' ' in the 'interfaced' column and status 'CR', 'RC', 'CK',
or 'RL'.
 TSNASR table with corresponding sub-receipt numbers for the ASNs.
 TPO_MATRIX table with PO line numbers for some ASNs.
 TPO_VENDOR_PACK table with vendor pack information for some ASNs (relevant for
ASNs with missing PO line numbers).
 TCODEPT table with department information.

Code Table Validation:

 The program should use the following code tables for data validation and
insertions/updates:
o ASNVEND - Copybook for the vendor ASN file layout.
o TSNASN - Table containing ASN information.
o TSNASR - Table containing ASN detail information.
o TPOMTRX - Table containing PO matrix information (PO line numbers).
o TPOVPCK - Table containing vendor pack information.
o TCOSKU - Table containing color and size information for SKUs.
o TCODEPT - Table containing department information (used to determine brand ID).

Data Explanation:

 The program will extract ASNs from the TSNASN table based on the specified criteria (not
interfaced, status 'CR', 'RC', 'CK', or 'RL').
 The program will use the TSNASR table to get details about the ASN, such as sub-receipt
number and carton number.
 The program will use the TPOMTRX table to get the PO line number for the ASN. If the
PO line number is missing in TPOMTRX, the program will attempt to get the vendor pack
SKU from the TPO_VENDOR_PACK table and use it to construct a PO line number.
 The program will use the TCOSKU table to get the size information for the SKU.
 The program will use the TCODEPT table to determine the brand ID based on the
department number and order type of the ASN.
 The extracted ASN data will be formatted into vendor ASN records according to the
ASNVEND copybook layout and written to the TASNP.TASN6800.VENDOR.ASNS file.

Test Case 2: File Send to Ascenda (JSTP020)

Pre-conditions:

 The TASN6800 job has completed successfully and the


TASNP.TASN6800.VENDOR.ASNS file has been created.
 The user wants to send the vendor ASN file to Ascenda.

Test Steps:

1. Manually initiate the JSTP020 job step.


2. The JSTP020 job step will use the TAMKSFTW program to transfer the
TASNP.TASN680

2.

Test Cases for SNB6800 Program and TASN6800 Job

Test Case 1: Create vendor ASN file to send to Ascenda (JSTP010)

Pre-conditions:

 There are ASNs in the database that have not been interfaced yet (interface=' ') and have
a status of 'CR', 'RC', 'CK', or 'RL'.
 The user wants to extract ASNs for all entities (direct, retail, or both).
 The user wants to include ASNs with missing PO line numbers in the vendor ASN file (JP-
PARM-MISSING-PO-RC='Y').

Test steps:

1. Submit the TASN6800 job with the following JCL parameters:


o JP-PARM-ENTITY='BOTH'
o JP-PARM-MISSING-PO-RC='Y'
2. The SNB6800 program will execute and:
o Open the TSNASN table and extract ASNs that meet the criteria.
o For each ASN, it will determine the entity (direct or retail) based on the order type.
o It will then select the corresponding data from TPO_MATRIX, TSNASR, TSNCSKU,
etc. tables.
o If a PO line number is missing from TPO_MATRIX, the program will include the ASN
in the vendor ASN file with a blank PO line number.
o For vendor packs (PO-PACK-TYPE='V'), the program will use the master SKU from
TPO_VENDOR_PACK instead of the SKU number from TSNCSKU.
o The program will update the interfaced column in TSNASN to 'V' for each ASN
included in the vendor ASN file.
o It will create a record in the PSTEP050.ASNLOAD DD dataset for each ASN with the
following format:
 Vendor ASN ID (RCPT_NUM from TSNCSKU)
 Warehouse (from ASN table)
 PO number (without leading zeros)
 Brand ID (based on department number and order type)
 Carton number (from TSNCSKU)
 Ship date (from ASN table)
 Estimated delivery date (from ASN table)
 Vendor creation date (from current timestamp)
 Vendor creation time (from current timestamp)
 Vendor number (from ASN table)
 PO line number (from TPO_MATRIX or constructed using row number and SKU for
vendor packs)
 SKU number (from TSNCSKU or master SKU from TPO_VENDOR_PACK)
 Unit quantity (from TSNCSKU)
 Bill of lading number (from ASN table)
 Vendor ASN source ('VENDOR')
 Booking number (from ASN table)
3. The TAMKSFTW program (JSTP020) will be executed if RC=0 to transfer the vendor
ASN file to the Ascenda server.

Expected results:

 A vendor ASN file will be created in PSTEP050.ASNLOAD DD dataset containing records


for all ASNs that meet the criteria, including those with missing PO line numbers.
 The interfaced column in TSNASN will be updated to 'V' for each ASN included in the
vendor ASN file.
 The TAMKSFTW program will be executed to transfer the vendor ASN file to Ascenda
(simulated in this test case).

Test Case 2: File send to Ascenda (JSTP020)

Pre-conditions:

 The TASN6800 job has successfully completed (Test Case 1).


 A vendor ASN file has been created in PSTEP050.ASNLOAD DD dataset.

Test steps:

1. The TAMKSFTW program (JSTP020) will be automatically executed if the return code
from SNB6800 (JSTP010) is 0.
2. The TAMKSFTW program will:
o Use the information in the JCL parameters to connect to the Ascenda server.
o Read the vendor ASN file from PSTEP050.ASNLOAD DD dataset.
o Send the vendor ASN data to the Ascenda server using SFTP protocol.
o Rename the vendor ASN file in the SFTP directory to indicate successful transfer
(optional).

Expected results:

 The vendor ASN file will be transferred to the Ascena server using SFTP.
 The vendor ASN file in PSTEP050.ASNLOAD DD dataset will remain unchanged
(simulated in this test case).

Data Explanation and Code Tables Involved in Validation/Insertions and Updation:

Data Source | Description | **Used for Validation/

3.

Test Cases for SNB6800 Program and TASN6800 Job

Test Case 1: Create Vendor ASN File to Send to Ascenda (JSTP010)

Pre-conditions:

 There are ASNs in the database that have not been interfaced yet (interface=' ') and have
a status of 'CR', 'RC', 'CK', or 'RL'.
 The user wants to extract and create vendor ASN records for both 'DIRECT' and 'RETAIL'
entities.
 The user wants missing PO line numbers to be reported (JP-PARM-MISSING-PO-
RC='Y').

Test steps:

1. Submit the TASN6800 job with JCL parameter JP-PARM-ENTITY='BOTH' and JP-
PARM-MISSING-PO-RC='Y'.
2. The SNB6800 program will execute and extract ASN data from the database based on
the selection criteria.
3. For each extracted ASN, the program will determine the entity type (DIRECT or
RETAIL) based on the order type and create a vendor ASN record.
4. The vendor ASN record will include details like PO number, warehouse, SKU number,
unit quantity, etc.
5. The program will attempt to find the corresponding line number and row number from
the TPO_MATRIX table for 'R' type PO packs and from the TPO_VENDOR_PACK table
for 'V' type PO packs.
6. If a line number and row number are not found, the program will report the missing
information but continue processing other ASNs.
7. The program will update the 'INTERFACED' field in the TSNASN table to 'V' for each
processed ASN.
8. The program will write the vendor ASN records to the output file
TASNP.TASN6800.VENDOR.ASNS.
9. The program will display the number of ASN records created and any errors
encountered.

Expected results:
 A vendor ASN file named TASNP.TASN6800.VENDOR.ASNS is created containing ASN
records for both 'DIRECT' and 'RETAIL' entities.
 The ASN records include details like PO number, warehouse, SKU number, unit quantity,
etc.
 Any missing line numbers and row numbers are reported in the program output.
 The 'INTERFACED' field in the TSNASN table is updated to 'V' for each processed ASN.

Test Case 2: File Send to Ascenda (JSTP020)

Pre-conditions:

 The TASN6800 job has successfully completed, and the vendor ASN file
(TASNP.TASN6800.VENDOR.ASNS) has been created.
 The SFTP server is configured correctly to transfer files to Ascenda.

Test steps:

1. Manually initiate the JSTP020 job step.


2. The JSTP020 job step will use the TAMKSFTW program to transfer the vendor ASN file
from the mainframe to the designated directory on the Ascenda SFTP server.

Expected results:

 The vendor ASN file (TASNP.TASN6800.VENDOR.ASNS) is transferred successfully to


the Ascenda SFTP server.
 The JSTP020 job step completes without errors.

Code Table Validation and Data Explanation

The SNB6800 program uses several code tables to validate data and perform lookups.
Here's a breakdown of some key tables and their usage:

 TSNASN: This table stores ASN header information like PO number, country code,
status, etc.
 TSNASR: This table stores ASN detail information like carton number, SKU number, and
unit quantity.
 TCOITEM: This table stores item information like style name and color code.
 TPOMTRX: This table stores the relationship between POs, styles, colors, sizes, and
line/row numbers.
 TPO_VENDOR_PACK: This table stores information about vendor packs associated with
POs.
 TCOSKU: This table stores size information for SKUs.
 TCODEPT: This table stores department information, including category code.

The program uses these tables to retrieve data relevant to creating vendor ASN records. For
example, it uses TSNASN to get the PO number and status, TSNASR to get the carton
number and SKU, TPOMTRX to get the line/row number for 'R' type PO packs, and
TPO_VENDOR_PACK to get the master SKU for 'V' type PO packs.

The program also performs validations based on the data retrieved from these tables. For
instance, it checks the 'INTERFACED' field in TSNASN to ensure it'

You might also like