IBM Power Systems AS/400 iSeries ¤Ë´Ø¤¹¤ë³Ð¤¨½ñ¤­¤Ê¥Ú¡¼¥¸¤Ç¤¹¡£

ILE-RPG Telnet¥¯¥é¥¤¥¢¥ó¥È¤ÎIP¥¢¥É¥ì¥¹¤Î¼èÆÀ

ÆþÎϥѥé¥á¡¼¥¿(10A):²èÌÌɽ¼¨ÁõÃÖ̾
Ìá¤êÃÍ(15A):IP¥¢¥É¥ì¥¹

DCRDEVDR.RPGLE

     H nomain
      *
      * CRTRPGMOD¤·¤ÆCRTSRVPGM¤Ë¤Æ¥µ¡¼¥Ó¥¹¥×¥í¥°¥é¥à¤òºîÀ®
      * CRTRPGMOD SRCMBR(DCRDEVDR)
      * CRTSRVPGM SRVPGM(DCRDEVDR) EXPORT(*ALL)
      *
     D DCRDEVDR        PR            15a
     D  DevName                      10a
     D HandleErr       PR
      *
     P DCRDEVDR        B                   EXPORT
     D DCRDEVDR        PI            15a
     D  DevName                      10a
      *
     D DCRDEVD         PR                  EXTPGM('QDCRDEVD')
     D  RcvVar                    65535a   Options( *VarSize)
     D  RcvVarLen                    10i 0 Const
     D  FmtName                       8a   Const
     D  DevName                      10a   Const
     D  ErrorCode                          like(APIErr)
      *
     D DEVD0600        DS         65535    Qualified
     D*                                             Qdc DEVD0100
     D QDCBRTN13               1      4B 0
     D*                                             Bytes Returned
     D QDCBAVL13               5      8B 0
     D*                                             Bytes Available
     D QDCDIR13                9     15
     D*                                             Date Info Retrieved
     D QDCTIR13               16     21
     D*                                             Time Info Retrieved
     D QDCDN10                22     31
     D*                                             Device Name
     D QDCDC00                32     41
     D*                                             Device Category
     D QDCOAIPL12             42     51
     D*                                             Online At IPL
     D QDCTD13                52    101
     D*                                             Text Desc
     D QDCERVED34            102    104
     D*                                             Reserved
     D*****************************************************************
     D*Type Definition for the DEVD0600 format - *DSP
     D****                                                          ***
     D*NOTE: The following type definition only defines the fixed
     D*   portion of the format.  Any varying length field will
     D*   have to be defined by the user.
     D*****************************************************************
     D*                                             Qdc DEVD0600
     D*QDCD010018                   104
     D*                                             DEVD0100
     D  QDCBRTN18              1      4B 0
     D*                                             Bytes Returned
     D  QDCBAVL18              5      8B 0
     D*                                             Bytes Available
     D  QDCDIR18               9     15
     D*                                             Date Info Retrieved
     D  QDCTIR18              16     21
     D*                                             Time Info Retrieved
     D  QDCDN15               22     31
     D*                                             Device Name
     D  QDCDC05               32     41
     D*                                             Device Category
     D  QDCOAIPL17            42     51
     D*                                             Online At IPL
     D  QDCTD18               52    101
     D*                                             Text Desc
     D  QDCERVED40           102    104
     D*                                             Reserved
     D QDCIDGCS              105    108B 0
     D*                                             Char ID Graphic Char Set
     D QDCCIDCP              109    112B 0
     D*                                             Char ID Code Page
     D QDCMLRU               113    116B 0
     D*                                             Max Length Request Unit
     D QDCIT                 117    120B 0
     D*                                             Inactive Timer
     D QDCFRAMS              121    124B 0
     D*                                             DBCS Feature RAM Size
     D QDCAT01               125    128B 0
     D*                                             Activation Timer
     D QDCSS                 129    132B 0
     D*                                             Switch Setting
     D QDCDP                 133    136B 0
     D*                                             Device Port
     D QDCMOF                137    140B 0
     D*                                             Max Outstand Frames
     D QDCIT00               141    144B 0
     D*                                             Idle Timer
     D QDCNRMPT              145    148B 0
     D*                                             NRM Poll Timer
     D QDCFR                 149    152B 0
     D*                                             Frame Retry
     D QDCOAD11              153    156B 0
     D*                                             Offset Auxiliary Devices
     D QDCNBRAD12            157    160B 0
     D*                                             Num Auxiliary Devices
     D QDCLAD12              161    164B 0
     D*                                             Length Auxiliary Devices
     D QDCDC06               165    174
     D*                                             Device Class
     D QDCDT01               175    184
     D*                                             Device Type
     D QDCDM00               185    194
     D*                                             Device Model
     D QDCLLA01              195    204
     D*                                             Local Location Addr
     D QDCANSCN02            205    214
     D*                                             Attached Non Switch Ctl Name
     D QDCKLT                215    224
     D*                                             Keyboard Language Type
     D QDCDLAS               225    234
     D*                                             Drop Line At Signoff
     D QDCABC                235    244
     D*                                             Allow Blinking Cursor
     D QDCPD06               245    254
     D*                                             Print Device
     D QDCRLN03              255    264
     D*                                             Remote Location Name
     D QDCLLN02              265    274
     D*                                             Local Location Name
     D QDCRNID03             275    284
     D*                                             Remote Net ID
     D QDCCSDD               285    294
     D*                                             Ctl Session Device Desc
     D QDCAPN                295    304
     D*                                             Assoc Printer Name
     D QDCPRNID              305    314
     D*                                             Assoc Printer Remote Net ID
     D QDCAPN00              315    324
     D*                                             Alternate Printer Name
     D QDCAPRNI              325    334
     D*                                             Alternate Printer Remote Net
     D QDCOQN                335    344
     D*                                             Output Queue Name
     D QDCOQLIB              345    354
     D*                                             Output Queue Library
     D QDCINTER              355    364
     D*                                             Printer
     D QDCPFILN              365    374
     D*                                             Print File Name
     D QDCPFILL              375    384
     D*                                             Print File Library
     D QDCWSCON              385    394
     D*                                             Work Station Custom Obj Name
     D QDCWSCOL              395    404
     D*                                             Work Station Custom Obj Lib
     D QDCAT02               405    414
     D*                                             Application Type
     D QDCCSFMS              415    424
     D*                                             DBCS Feature Matrix Size
     D QDCSFLID              425    434
     D*                                             DBCS Feature Language ID
     D QDCSFLCP              435    444
     D*                                             DBCS Feature Last Code Point
     D QDCNAPTD              445    454
     D*                                             SNA Pass Through Device
     D QDCAPTGN              455    464
     D*                                             SNA Pass Through Group Name
     D QDCED00               465    474
     D*                                             Emulated Device
     D QDCEDM                475    484
     D*                                             Emulated Device Model
     D QDCSCIID              485    494
     D*                                             Emulating ASCII Device
     D QDCPA                 495    504
     D*                                             Physical Attachment
     D QDCLS                 505    514
     D*                                             Line Speed
     D QDCWL                 515    524
     D*                                             Word Length
     D QDCPT                 525    534
     D*                                             Parity Type
     D QDCSB                 535    544
     D*                                             Stop Bits
     D QDCIITID              545    564
     D*                                             ASCII Terminal ID
     D QDCAPPCD              565    574
     D*                                             Assoc APPC Device
     D QDCHSLC               575    830
     D*                                             Host Signon Logon Command
     D QDCPTID               831    831
     D*                                             Pass Through ID
     D QDCAC03               832    841
     D*                                             Automatically Configured
     D QDCERVE26             842    844
     D*                                             Reserved
     D QDCSSNBR              845    848B 0
     D*                                             Shared Session Num
     D QDCDLN                849    858
     D*                                             Dependent Location Name
     D QDCNP                 859    859
     D*                                             Network Protocol
     D QDCNPA                860    877
     D*                                             Network Protocol Address
     D QDCIPADF              878    892
     D*                                             Network IP Address Dotted Fm
     D QDCABJ03              893    902
     D*                                             Allocated By Job
     D QDCABU03              903    912
     D*                                             Allocated By User
     D QDCABJN03             913    918
     D*                                             Allocated By Job Number
     D QDCCMQN05             919    928
     D*                                             Current Message Queue Name
     D QDCCMQL05             929    938
     D*                                             Current Message Queue Librar
     D QDCSNP00              939    939
     D*                                             Server Network Protocol
     D QDCSNPA00             940    957
     D*                                             Server Network Protocol Add
     D QDCSNIPA              958    972
     D*                                             Server Network IP Add
      *
     D APIErr          DS                  Qualified
     D  ErrSize                      10i 0 inz(%size(APIErr))
     D  ErrLen                       10i 0 inz(0)
     D  ErrID                         7a
     D  rsvd                          1a
     D  ErrData                   32767a
      *
     D RcvSize         S             10  0 INZ(262140)
     D rtn             S             15a   inz(*blank)
      *
      *
      /free
          DCRDEVD  ( DEVD0600 :
                     RcvSize :
                     'DEVD0600' :
                     DevName :
                     APIErr ) ;

          if APIErr.ErrLEN <> 0 ;
            HandleErr() ;
            rtn = 'ERROR' ;
          else ;
            rtn = DEVD0600.QDCIPADF ;
          endIf ;
        return rtn ;
      /End-Free
     P DCRDEVDR        E
     P HandleErr       B
     D HandleErr       PI
      /free
      /end-free
     P HandleErr       E 

¥Æ¥¹¥ÈÍÑ¥×¥í¥°¥é¥à

SUBTEST.RPGLE
     H**FTACTGRP(*NO)
      * ¥×¥í¥°¥é¥à¤ÎºîÀ®ÊýË¡
      * CRTRPGMOD MODULE(SUBTESTR)
      * CRTPGM PGM(SUBTESTR) MODULE(*PGM) BNDSRVPGM(DCRDEVDR)
     D SUBTESTR        PR
      *
     D SUBTESTR        PI
      *
     D DCRDEVDR        PR            15a
     D  DevName                      10a
      *
     D  WKSTR          S             10a   INZ('PRIMULADSP')
      *
      /free
        DSPLY (DCRDEVDR(WKSTR));
        *inLR = *on ;
        return ;
      /End-Free 

¤³¤Î¥Ú¡¼¥¸¤Ø¤Î¥³¥á¥ó¥È

GObdRc wow, awesome blog post.Thanks Again. Want more.

0
Posted by awesome things! 2014ǯ01·î22Æü(¿å) 14:56:35 ÊÖ¿®

nU8DW0 Appreciate you sharing, great article. Awesome.

0
Posted by seo thing 2013ǯ12·î19Æü(ÌÚ) 22:46:56 ÊÖ¿®

6WDOTd <a href="http://vwiquwxzdbhg.com/">vwiquwxzdbhg</a>, [url=http://hncixauapexl.com/]hncixauapexl[/url], [link=http://mtinctnmvdjd.com/]mtinctnmvdjd[/link], http://whlgsehvgtck.com/

0
Posted by eavbwlhn 2013ǯ11·î21Æü(ÌÚ) 23:16:20 ÊÖ¿®

EoGGe7 <a href="http://qwtxknqklwfp.com/">qwtxknqklwfp</a>, [url=http://glasdyrpzvwq.com/]glasdyrpzvwq[/url], [link=http://drgssnfannkt.com/]drgssnfannkt[/link], http://gojyhpfdfydx.com/

0
Posted by oyjlglducl 2013ǯ11·î15Æü(¶â) 05:52:55 ÊÖ¿®

¥³¥á¥ó¥È¤ò¤«¤¯


¡Öhttp://¡×¤ò´Þ¤àÅê¹Æ¤Ï¶Ø»ß¤µ¤ì¤Æ¤¤¤Þ¤¹¡£

ÍøÍѵ¬Ìó¤ò¤´³Îǧ¤Î¤¦¤¨¤´µ­Æþ²¼¤µ¤¤

WikiÆ⸡º÷

Menu

¤³¤³¤Ï¼«Í³¤ËÊÔ½¸¤Ç¤­¤ë¥¨¥ê¥¢¤Ç¤¹¡£

¥á¥ó¥Ð¡¼¤Î¤ßÊÔ½¸¤Ç¤­¤Þ¤¹