Repeated Data


1

2

3

4

5

6

7

8

9

10

1. Unit Objectives

In this unit we will see how to import a *.svd and *.ldf files, using one of two methods. We will also see that existing *.ldf files can be copied and used against new data.

2. Importing Sample Data Files

In this section we will import the SummarySample.svd file.

  1. 1. In the Work Center Manager click on Data tab, Sample Data bar.
  2. 2. Double-click the Company Letters project folder.
  3. 3. From the main menu select Tasks/ Import Sample Data.
  4. 4. Click SummarySample.svd.
  5. 5. Click Open.
  6. 6. Data Type, select, Keyed Records (byte measured).
  7. 7. Delineation, select, CR/LF Terminated.
  8. 8. Default Encoding Scheme, select, Host default.
  9. 9. Default Locale, keep default.
  10. 10. Default Data Handling, keep default.
  11. 11. Default string options, click, Trim Left and Right checkbox.
  12. 12. Click OK.

so far:

We need to repeat the import procedure for TransSample.svd.

  1. 1. From the main menu select Tasks/ Import Sample Data.
  2. 2. Click TransSample.svd.
  3. 3. Click Open.
  4. 4. Data Type, select, Keyed Records (byte measured).
  5. 5. Delineation, select, CR/LF Terminated.
  6. 6. Default Encoding Scheme, select, Host default.
  7. 7. Default Locale, keep default.
  8. 8. Default Data Handling, keep default.
  9. 9. Click OK.

When you import a sample data file there is a Data Format automatically created for you. In this section we are going to delete the Data Format files that were created.

  1. 1. In the Work Center Manager click on Data tab, Data Formats bar.
  2. 2. Double-click the Company Letters project folder.
  3. 3. In the Navigator delete, SummarySample Data Format and TransSample Data Format.

3. Importing Legacy Data File

In this section we will now import the legacy data definition file (*.ldf) and associate it to SummarySample.svd file.

  1. 1. In the Work Center Manager click on Data tab, Data Formats bar.
  2. 2. Double-click the Company Letters project folder.
  1. 3. From the main menu select Tasks/ Import Legacy Data Format.
  2. 4. Click Summary.ldf.
  3. 5. Click Open.

Series 5 will now ask you to associate the Summary.ldf file with a *.svd file currently in the repository.

  1. 1. Double-click on Company Letters project folder.
  2. 2. Click SummarySample.svd.
  3. 3. Click Open.

The data definition file has been now imported and applied to the selected sample data file.

For your information, the field descriptions are below:

C001 Customer Details

Description

From

To

Length

Type

C001- Title

6

8

3

String

C001- First Name

9

13

5

String

C001- Last Name

14

19

6

String

C001- Address Line 1

20

36

17

String

C001- Address Line 2

37

47

11

String

C001- City

48

56

9

String

C001- Postal Code

57

62

6

String

C001- Region

63

65

3

String

 

C002 Account Information

Description

From

To

Length

Type

C002- Account Status

6

14

9

String

C002- Account Number

15

23

9

String

C002- Service 1 Open Balance

24

27

4

Number

C002- Service 2 Open Balance

28

31

4

Number

C002- Service 3 Open Balance

32

35

4

Number

C002- Customer Service Number

36

43

8

String

C003 Service Information

Description

From

To

Length

Type

C003- Service Type

6

13

8

String

C003- Service1

14

19

6

String

C003- Service1 Account Ref

20

27

8

String

C003- Service1 Current Balance

28

32

5

Number

C003- Service2

33

41

9

String

C003- Service2 Account Ref

42

53

12

String

C003- Service2 Current Balance

54

59

6

Number

C003- Service3

60

63

14

String

C003- Service3 Account Ref

74

73

14

String

C003- Service3 Current Balance

88

92

5

String

 

4. Reusing a *.LDF File

In this section we will reuse the Summary.ldf using a different sample data file.

  1. 1. In the Work Center select the Summary Data Format file.
  2. 2. From the main menu select Edit/ Copy.
  3. 3. From the main menu select Edit/ Paste.
  4. 4. Right-click on Copy of Summary.
  5. 5. Select Rename.
  6. 6. Rename this file to Transactional.

5. Associating Different Sample Data File

We will now associate the Transactional.ldf file with TransSample.svd. You will notice that there are two additional records, C004 and C005 that are not defined. This is the only difference between the two files.

  1. 1. Double-click on Transactional.ldf.
  2. 2. From the main menu select Tasks/ Change Sample Data.
  3. 3. Double-click on Company Letters project folder.
  4. 4. Select TransSample.svd.
  5. 5. Click Open.

6. Additional Record Formatting

Notice that the existing record types have now been defined. We must finish the file definition for those records and fields that have not been defined.

First we will define the two records C004 Transaction Summary and C005 Detailed Transactions.

  1. 1. To expand the structure view, click “C001” (C001- Customer Details).
  1. 2. In the structure view, right-click “C004” Untitled.
  2. 3. Click Rename. Type, C004- Transaction Summary.
  3. 4. In the structure view, right-click C004- Transaction Summary.
  4. 5. Click Mandatory.

Lets continue with the C005 Detailed Transaction by setting it to Single Repeating.

  1. 1. In the structure view, right-click “C005” Untitled.
  2. 2. Click Rename. Type, C005- Detailed Transactions.
  3. 3. In the structure view, right C005- Detailed Transactions.
  4. 4. Click Single Repeating.

so far:

7. Formatting Variable Length Fields

Notice that the data fields in the C004 and C005 record are not fixed in length - i.e. a given field’s length varies from record to record. We must then define these fields as variable length fields.

In this section we will format the variable length data fields for C004 Transaction Summary and C005 Detailed Transactions.

  1. 1. In the C004 record, select columns 6 - 11.
  1. 2. From the main menu select Define/ Field.
  1. 3. Description, type, C004- Previous Amount.
  2. 4. Type, select, Number.

We will now set the Position relative to previous field box and the Variable size field to tell Series 5 how to treat this variable length field. We will check the first box to let Series 5 know that the initial position of these fields do not have a fixed position, i.e. their initial position may change from record to record. We will click the Variable size field box to define the character (or characters) that will tell Series 5 where the field ends.

  1. 1. Click Position relative to previous field checkbox.
  2. 2. Click Variable size field checkbox.
  3. 3. Byte count ending field, type, 1.
  4. 4. Click Define.
By doing this, we are telling Series 5 that the “|” character defines the end of the field.

Now repeat this same process for the remaining fields in the C004 and C005 records.

  1. 5. Using the table below to define the fields:

Position relative to previous field and Variable size field checkboxes will both be checked in all definitions.

C004 Transaction Summary

Description

From

To

Length

Type

C004- Total Service Usage

12

17

6

Number

C004- Customer Requested Sort Order

18

26

9

String

  1. 6. Continue using the table below to define the fields:

Position relative to previous field and Variable size field checkboxes will both be checked in all definitions. Offset will always be zero.

C005 Detailed Transactions

Description

From

To

Length

Type

C005- Transaction Date

6

12

7

Date ddmmyy

C005- Transaction Time

13

18

6

String

C005- Transaction Location

19

25

7

String

C005- Transaction Cost

26

30

5

Number

  1. 7. Save the Transactional.ldf file.

so far:

We need to issue the Transactional Data Format file. This allows us to use the Generate Dictionary Wizard that will be used in the next section.

  1. 8. In the Work Center Manager click on Data tab, Data Format bar.
  2. 9. Double-click the Company Letters project folder.
  3. 10. Highlight, Transactional Data Format file.
  4. 11. From the main menu select Task/ Issue.

8. Automatically Generate Data Dictionary and Map

There are a few ways of creating the data dictionary and map. In this section we are going use the Wizard to create the data dictionary and map for the Transactional Statement. We will create the data map for Summary Statement using the Production Wizard and the dictionary in later units.

  1. 1. Highlight Transactional Data Format file.
  2. 2. From the main menu select Task/ Generate Dictionary.
  3. 3. Publication Data Set, select “C001” (C001-Customer Details).
  1. 4. Click Next.
  2. 5. Dictionary Name, type, Transactional Dictionary.
  1. 6. Click Next.
  2. 7. Data Map Name, type, Transactional Map.
  1. 8. Click Finish.

9. Issuing Data Map

When using version 5.5 and an automatically generated Data Map we no longer have to issue our Transactional Data Map. The system automatically issues it for us.

10. Creating Data Dictionary

We are going to create a Data Dictionary for the Summary Statement. This is where we will store all the data aliases for the next document.

  1. 1. In the Work Center Manager click on Data tab, Data Dictionary bar.
  2. 2. Double-click the Company Letters project folder.
  3. 3. From the main menu select File/ New Data Dictionary.
  4. 4. Type, Summary.
  5. 5. Press Enter.