ISP International
Software Products
Home  |   Products & Services  |   Support  |   Offices  |   Partners  |   Contact Us

ASI2 Code Samples
Sample ASI2 Statements for selecting IDD Data
 

Notes regarding the following code Samples:

  1. The samples use the 'REUSE ;' statement. An initial run using the 'DBNAME ;' statement would be used to catalog the SYSPCH dataset and/or member.
  2. For ASI2LR, the 'CONTROL' statement and related 'FROM' and 'PARTIAL' or 'COMPLETE statements would be replaced by a standard CA-IDMS LRF DML statement.

SAMPLE #2:

  • Extract all elements for the ELEMSYN-085.
  • Select only the RECORD name, ELEMENT name, COBOL LEVEL, PICTURE clause and VALUE fields.

DATA SUBSCHEM ;
SSNAME='IDMSNWKA' ;
PROC ASI2 OUT=TEST DATA=SUBSCHEM;
REUSE ;
DB IDMSNWKA WITHIN IDMSNTWK VERSION 1. ;
CONTROL SS-026 RANDOM SS-NAM-026 PARTIAL ;
FROM SS-026 TO SSR-032 BY SS-SSR NEXT ;
FROM SSR-032 TO RCDSYN-079 BY RCDSYN-SSR OWNER
WHEN RSYN-NAME-079 EQ ELEMSYN-085 ;
FROM RCDSYN-079 TO NAMESYN-083 BY RCDSYN-NAMESYN NEXT ;
FROM NAMESYN-083 TO SDR-042 BY SDR-NAMESYN OWNER ;
PARTIAL ;
FROM SDR-042 TO SDES-044 BY SDR-SDES NEXT ;
KEYVARS SSNAME ;
SELECT RSYN-NAME-079 RECORD ;
SELECT SYN-NAME-083 ELEMENT ;
SELECT DR-LVL-042 LEVEL ;
SELECT PIC-042 PICTURE ;
SELECT VAL1-044 VALUE1 ;
SELECT VAL2-044 VALUE2 ;
PROC PRINT ;
BY RECORD ;  

ASI2/ASI2LR Sample 1 ASI2/ASI2LR Sample 2 ASI2/ASI2LR Sample 3

All Trademarks Acknowledged Copyright 1987 - 2009 International Software Products