Previous Topic: ExamplesNext Topic: Adding a DL/I Segment


View a DL/I Segment

Follow this procedure to view a DL/I segment:

  1. Specify the following required information:
    FUNC= a DL/I get function
    SIZE= size of DL/I segment
    
  2. Enter the following optional information:
    SSA= the SSAs needed to retrieve the requested segment
    
  3. Press Enter. The returned PCB information is displayed in the lower‑right portion of the FILE screen. If the call is successful, the segment also displays.

Examples

  1. To retrieve the first root segment, which is 975 bytes long, specify the following, and then press Enter:
    FUNC= GU
    SIZE= 975		(or 3CF for FORMAT= D)
    
  2. To sequentially process a database whose longest segment is 2000 bytes, specify the following, and then press Enter for each segment:
    FUNC= GN
    SIZE= 2000		(or 7D0 for FORMAT= D) 
    
  3. To retrieve an EMPLOYEE segment, which is 100 bytes long, specify the following, and then press Enter. (Its key is ADAMS, and its parent is a SKILL segment with a key of ARTIST.)
    FUNC= GU
    SIZE= 100 		(or 64 for FORMAT= D)
    SSA= SKILL (SKILCODE= ARTIST) SSA=EMPLOYEE(NAME = ADAMS)
    

Update a DL/I Segment

Follow this procedure to update a DL/I segment:

  1. Specify the following required information:
    FUNC= GHU, GHN, or GHNP
    
  2. Enter the following optional information:
    SIZE= size of DL/I segment
    SSA= the SSAs needed to retrieve the requested segment
    
  3. Press Enter. The returned PCB information is displayed in the lower‑right portion of the FILE screen. If the call is successful, the segment is also displayed. The STAT field indicates if the call is successful. Make your changes to the displayed segment. See the section Change Data in the Work Area for details.
  4. To rewrite the updated segment, specify the following:
    FUNC= REPL
    
  5. Press Enter.

    The returned PCB information is displayed.

Example

To retrieve, change, and replace a SKILL segment whose key is ARTIST and whose length is 100 bytes, follow these steps:

  1. Specify the following, and then press Enter:
    FUNC= GHU
    SIZE= 100   		(or 64 for FORMAT= D)
    SSA= SKILL   (SKILCODE= ARTIST)
    
  2. Change the segment.
  3. Specify the following:
    FUNC= REPL
    
  4. Press Enter.