TapeTrack Documentation

Because there is more to tape management than you ever realized

User Tools

Site Tools


engine:import:extract

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
engine:import:extract [2018/08/14 22:43] – created dcummingengine:import:extract [2025/01/21 22:07] (current) – external edit 127.0.0.1
Line 1: Line 1:
-extract +====== Extract ======
- +
-==== Extract ====+
 Extract a field from a record, CSV element or SQL field. Extract a field from a record, CSV element or SQL field.
  
-==== Phase ====+===== Phase =====
 This instruction is used by the TapeTrack Import Engine. This instruction is used by the TapeTrack Import Engine.
  
-==== Syntax ==== +===== Syntax ==== 
-**Extract**//(field, offset, length, record);//+''Extract(field, offset, length, record);'' 
 + 
 +^ Variable ^ Type ^ Description ^ Min Length ^ Max Length ^ Min Value ^ Max Value ^ 
 +|field| String | The field to be set by this extraction.|1|128| | | 
 +|offset| Integer | The zero based offset of the data to be extract, or the element index of a CSV element or SQL element. In the event that the data being processed is CSV based, a value of zero indicates that the raw CSV string should be extracted rather than an individual CSV element.|1|10|-214748364 |2147483647| 
 +|length| Integer| The length of the data to be extracted if the data is text based, or the maximum data length for CSV or SQL data.|1|10|-214748364 |2147483647| 
 +|record| Integer|The record within a header, if the value is non-zero and the data is text based. A record that is not a header if the value is zero and the data is text based. For CSV and SQL data this argument is ignored.|1|10|-214748364 |2147483647| 
 + 
 +===== Example ===== 
 +Extract VOLUME field from offset 10, length 6 of the body of a report. 
 +<code> 
 +Extract(VOLUME, 10, 6, 0); 
 +</code>
  
-//string field;//\\ +Extract VOLUME field from the 2nd element of a CSV file. 
-//integer offset;//\\ +<code> 
-//integer length;//\\ +SetCSVDelimiter(",")
-//integer record;//\\+Extract(VOLUME, 2, 6, 0)
 +</code>
  
-|field| The field to be set by this extraction.| +Extract REPOSITORY field from offset 70, length 4 of the 3rd record of a header
-|offset| The zero based offset of the data to be extract, or the element index of a CSV element or SQL elementIn the event that the data being processed is CSV based, a value of zero indicates that the raw CSV string should be extracted rather than an individual CSV element.| +<code> 
-|length| The length of the data to be extracted if the data is text basedor the maximum data length for CSV or SQL data.| +Extract(REPOSITORY, 704, 3); 
-|record| The record within a header, if the value is non-zero and the data is text based. A record that is not a header if the value is zero and the data is text based. For CSV and SQL data this argument is ignored.|+</code>
  
-==== Example ==== +===== See Also =====
-**Extract: Extract VOLUME field from offset 10, length 6 of the body of a report.** +
-|Extract(VOLUME, 10, 6, 0);|+
  
-==== Example ==== +[[engine:import|Import Engine Functions]] \\ 
-**ExtractExtract VOLUME field from the 2nd element of a CSV file.** +[[cli:sync_fields|Sync Engine Fields]] \\ 
-|SetCSVDelimiter(",");+[[cli:tmss10sync|TMSS10Sync]]
-|Extract(VOLUME, 2, 6, 0);|+
  
-==== Example ==== +{{tag> import_engine sync_engine}}
-**Extract: Extract REPOSITORY field from offset 70, length 4 of the 3rd record of a header.** +
-|Extract(REPOSITORY, 70, 4, 3);|+
engine/import/extract.1534286615.txt.gz · Last modified: 2025/01/21 22:07 (external edit)