Skip to main content
Version: 2.0

Field & Subfield Selection

The most fundamental operation in PFT is extracting data from the record. While v10 gets the whole field, CISIS provides powerful modifiers to extract exactly what you need.

1. Basic Extraction (v)

The command v (Value) followed by the Tag Number extracts the field's content.

  • Format: vTag
  • Example: v24 gets the content of the Title field.

2. Subfields (^)

In MARC and ABCD records, fields are often divided into subfields using a delimiter (usually ^ or $) and a single letter/number identifier.

Example Data (Tag 70): ^aDoe^bJohn

CommandResultNotes
v70DoeJohnWarning: Standard extraction removes delimiters but does not add spaces.
v70^aDoeExtracts only subfield a.
v70^bJohnExtracts only subfield b.

Best Practice: Always format subfields explicitly to control punctuation:

v70^b, " ", v70^a
/* Result: John Doe */

3. Offset and Length

You can extract a substring based on character position (byte offset) and length.

Syntax: vTag*Offset.Length

  • *Offset: The starting character position (0-based).
  • .Length: The number of characters to extract.

Example Data (Tag 10): 2023-10-27

CommandResultExplanation
v10.42023Get first 4 chars (Year).
v10*5.210Skip 5 chars (2023-), take next 2 (Month).
v10*827Skip 8 chars, take the rest (Day).

4. Mode Modifiers

You can define how the extracted data behaves regarding repeated occurrences or display formatting.

Separators for Repeatable Fields

If Tag 70 has 3 occurrences (Authors), v70 joins them together. You can specify a separator using the +|...| syntax.

  • Syntax: vTag+|Separator|
  • Example: v70+|; |
  • Output: Author A; Author B; Author C

Empty/Absent Fields (d and n)

Sometimes you want to display a label only if the field exists (or doesn't).

  • dTag "Label": Displays "Label" if Tag exists (Dummy selector).

  • d24 "Title: "

  • nTag "Label": Displays "Label" if Tag is ABSENT (Null selector).

  • n20 "ISBN Missing!"

Summary Table

SyntaxNameUse Case
v10ValueFull content.
v10^aSubfieldSpecific part (e.g., surname).
v10*0.5SubstringFixed-width data (dates, codes).
(v10/)GroupIterate repeatable fields on new lines.