www.sas.com > Service and Support > Technical Support
 
Technical Support SAS - The power to know(tm)
  TS Home | Intro to Services | News and Info | Contact TS | Site Map | FAQ | Feedback


/*-------------------------------------------------------------------+
|                COPYRIGHT (C) 1995, SAS INSTITUTE INC.              |
|                  UNPUBLISHED - ALL RIGHTS RESERVED                 |
|                     S A S / C   S A M P L E                        |
|                                                                    |
|         NAME: TIOTLIST                                             |
|     LANGUAGE: C                                                    |
|      PURPOSE: Return the TIOT structure for the current DD entry.  |
| MVS -                                                              |
|      COMPILE: Use JCL in prefix.SAMPLE.AUX(JOBDDN).                |
|         LINK: Use JCL in prefix.SAMPLE.AUX(JOBDDN).                |
|      EXECUTE: Use JCL in prefix.SAMPLE.AUX(JOBDDN).                |
| TSO - N/A                                                          |
| MVS - N/A                                                          |
|        INPUT: Parms: tiot: pointer to TIOT structure               |
|                      len:  first time through it should be zero (0)|
|                            after that it is reserved!              |
|       OUTPUT: pointer to TIOT structure                            |
|               Note: the first call to TIOTLIST will return the     |
|                     job name and step name (in addition to the DD  |
|                     entry).  All invocations after that will only  |
|                     return the current DD entry.                   |
|        USAGE: See sample program JOBDDN                            |
| SYSTEM NOTES: Must be compiled with version 4.00 (or later)        |
|   MISC NOTES: The TIOT structure was created from the TIOT DSECT   |
|               using the DSECT2C utility available with version     |
|               4.00 (or later)                                      |
|                                                                    |
+-------------------------------------------------------------------*/
#include "tiot.h"

struct TIOT *tiotlist(tiot, len)
 struct TIOT *tiot;
 int *len;
 {
  char *temp;
  static int *psatold, *tcbtio;


    /*---------------------------------------------------------------+
    | first invocation?  Find the TIOT                               |
    +---------------------------------------------------------------*/
    if (*len == 0) {
       psatold = (int *)(0x21C);
       tcbtio = (int *) (*psatold + 12);
       tiot = (struct TIOT *)*tcbtio;
     }


    /*---------------------------------------------------------------+
    | point to current TIOT entry                                    |
    +---------------------------------------------------------------*/
    temp = (char *)((*tcbtio) + *len);


    /*---------------------------------------------------------------+
    | get ready for next call...                                     |
    +---------------------------------------------------------------*/
    *len += (int) tiot->tioelngh;

/*return(tiot); */
  return(struct TIOT *)(temp);
 }

Copyright (c) 2000 SAS Institute Inc. All Rights Reserved.
Terms of Use & Legal Information | Privacy Statement