Giter Club home page Giter Club logo

zpipe's Introduction

This is a coding example working on Caché 2018.1.3 and IRIS 2020.2  
It will not be kept in sync with new versions      
It is also NOT serviced by InterSystems Support !   

The example shows how to run a server command from within Caché / Ensemble / IRIS and get back the full output as seen in any server command shell. Instead of just displaying the result the more useful purpose is to check the interesting lines and just skip the rest. It's definitely easier than $ZF(-1,..) and $ZF(-2,...) exercises.

Demo1

   IRISAPP>d cmd^Zpipe("ping community.intersystems.com")
 
Ping wird ausgeführt für community.intersystems.com [54.83.203.138] mit 32 Bytes Daten:
Antwort von 54.83.203.138: Bytes=32 Zeit=120ms TTL=47
Antwort von 54.83.203.138: Bytes=32 Zeit=120ms TTL=47
Antwort von 54.83.203.138: Bytes=32 Zeit=119ms TTL=47
Antwort von 54.83.203.138: Bytes=32 Zeit=119ms TTL=47
 
Ping-Statistik für 54.83.203.138:
    Pakete: Gesendet = 4, Empfangen = 4, Verloren = 0
    (0% Verlust),
Ca. Zeitangaben in Millisek.:
    Minimum = 119ms, Maximum = 120ms, Mittelwert = 119ms

hint

You may add this line to %LANGC00.mac to make usage easier

   ZPIPE(%a) do cmd^Zpipe(%a) quit

Demo2

   IRISAPP>zpipe "ping community.intersystems.com"
 
Ping wird ausgeführt für community.intersystems.com [54.83.203.138] mit 32 Bytes Daten:
Antwort von 54.83.203.138: Bytes=32 Zeit=123ms TTL=47
Antwort von 54.83.203.138: Bytes=32 Zeit=119ms TTL=47
Antwort von 54.83.203.138: Bytes=32 Zeit=239ms TTL=47
Antwort von 54.83.203.138: Bytes=32 Zeit=119ms TTL=47
 
Ping-Statistik für 54.83.203.138:
    Pakete: Gesendet = 4, Empfangen = 4, Verloren = 0
    (0% Verlust),
Ca. Zeitangaben in Millisek.:
    Minimum = 119ms, Maximum = 239ms, Mittelwert = 150ms
 
IRISAPP>

Article in DC

zpipe's People

Contributors

sergeymi37 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.