OSI/FTAM Programming Guide
NonStop FTAM Programming Examples
HP NonStop OSI/FTAM Programming Guide—528612-001
5-82
Writing a File: TAL Programming Example
1558
1559 tempbuf ':=' "ERROR # " -> @text_ptr;
1560 IF (error_code < 0) THEN
1561 BEGIN
1562 error_code := -error_code;
1563 text_ptr ':=' "-" -> @text_ptr;
1564 END;
1565 @text_ptr := @text_ptr + DNUMOUT ( text_ptr
1566 , $DBL ( error_code )
1567 , BASE );
1568 text_len := @text_ptr - @tempbuf;
1569 CALL WRITE ( termnum, outbuf, text_len );
1570
1571 tempbuf ':=' "ERROR SUBCODE # " -> @text_ptr;
1572 IF (error_subcode < 0) THEN
1573 BEGIN
1574 error_subcode := -error_subcode;
1575 text_ptr ':=' "-" -> @text_ptr;
1576 END;
1577 @text_ptr := @text_ptr + DNUMOUT ( text_ptr
1578 , $DBL ( error_subcode )
1579 , BASE );
1580 text_len := @text_ptr - @tempbuf;
1581 CALL WRITE ( termnum, outbuf, text_len );
1582
1583 !------------------------------------------------------------------!
1584 ! Display the original error code and original error subcode. !
1585 !------------------------------------------------------------------!
1586
1587 tempbuf ':=' "ORIGINAL ERROR INFO - " -> @text_ptr;
1588 text_len := @text_ptr - @tempbuf;
1589 CALL WRITE ( termnum, outbuf, text_len );
1590
1591 tempbuf ':=' " SERVICE ID # " -> @text_ptr;
1592 @text_ptr := @text_ptr
1593 + DNUMOUT ( text_ptr
1594 , $DBL ( original_error_info.zerror.zservice^id )
1595 , BASE );
1596 text_len := @text_ptr - @tempbuf;