2014年12月23日 星期二

DB2 11 for z/OS manual

The good manual "DB2 11 for z/OS: Introduction to DB2 for z/OS." This is a good document for anyone who needs to learn the terminology and understand the architecture of DB2 for z/OS.

2014年11月24日 星期一

Open Source Hardware

Refer to Adafruit web site to get more information

2014年10月26日 星期日

Solar tracking system information

Circuit Components -1x Comparator – LM339D -4x Resistor – 10k -3x Resistor – 100k -2x Resistor – 2.2k -1x Resistor – 3.3k -2x Photo Transistor -2x PNP MOSFET – IRF5305 -2x NPN MOSFET – IRF3205 -1x Blocking Diode – BAT54 Web site information: http://greentechtown.com http://solartechtown.com/?p=811

2014年9月25日 星期四

RACF database records type

/* RACF database record types:*/
/* 0100   GROUP basic */
/* 0101   GROUP subgroup */
/* 0102   GROUP members */
/* 0103   GROUP instate */
/* 0110   GROUP DFP */
/* 0120   GROUP OMVS */
/* 0130   GROUP OVM */
/* 0141   GROUP TME Role @LIA*/
/* 0151   GROUP CSDATA (new) @M7A*/
/* 0200   USER basic */
/* 0201   USER category */
/* 0202   USER classauth */
/* 0203   USER-group connection (ignored; 0205 used instead) */
/* 0204   USER instate */
/* 0205   USER connect */
/* 0206   USER associations */
/* 0207   USER certificate data @LLA*/
/* 0208   USER associated mappings @LUA*/
/* 0210   USER DFP */
/* 0220   USER TSO */
/* 0230   USER CICS */
/* 0231   USER CICS opdata */
/* 0232   USER CICS RSL key info @M5A*/
/* 0233   USER CICS TSL key info @M5A*/
/* 0240   USER LANGUAGE */
/* 0250   USER OPERPARM */
/* 0251   USER OPERPARM SCOPE */
/* 0260   USER WORKDATA */
/* 0270   USER OMVS */
/* 0280   USER NETVIEW */
/* 0281   USER NETVIEW operator classes */
/* 0282   USER NETVIEW domains */
/* 0290   USER DCE */
/* 02A0   USER OVM */
/* 02B0   USER LNOTES */
/* 02C0   USER NDS @LKA*/
/* 02D0   USER KERB @LRA*/
/* 02E0   USER PROXY data @LTA*/
/* 02F0   USER EIM data @LZA*/
/* 02G1   USER CSDATA (new) @M7A*/
/* 0400   DATASET basic */
/* 0401   DATASET DATASET categories */
/* 0402   DATASET conditional access list */
/* 0403   DATASET volumes */
/* 0404   DATASET access list */
/* 0405   DATASET instdata */
/* 0410   DATASET DFP */
/* 0421   DATASET TME roles @LIA*/
/* 0500   general basic */
/* 0501   general TVTOC */
/* 0502   general categories */
/* 0503   general members */
/* 0504   general volume */
/* 0505   general access list */
/* 0506   general instdata */
/* 0507   general conditional access list */
/* 0508   general filter data @LUA*/
/* 0510   general SESSION */
/* 0511   general SESSION (ignored; obsolete) */
/* 0520   general DLF */
/* 0521   general DLF jobs */
/* 0540   general STDATA */
/* 0550   general System View */
/* 0560   general certificate data @LLA*/
/* 0561   general certificate references record @LLA*/
/* 0562   general keyring @LLA*/
/* 0570   general TME @LIA*/
/* 0571   general TME child @LIA*/
/* 0572   general TME resource @LIA*/
/* 0573   general TME group @LIA*/
/* 0574   general TME role @LIA*/
/* 0580   general KERB data @LRA*/
/* 0590   general PROXY data @LTA*/
/* 05A0   general EIM data @LZA*/
/* 05B0   general ALIAS data (ignored) @M0A*/
/* 05C0   general CDTINFO @M7C*/
/* 05D0   general ICTX (new) @M7A*/
/* 05E0   general CFDEF (new) @M7A*/

2014年9月19日 星期五

2014年8月8日 星期五

Print running jobs and their elapsed times

/* Rexx - Print running jobs and their elapsed times                 */ 
Numeric digits 20                                                        
cvt=ptr(16)                            /* Get CVT                    */ 
asvt=ptr(cvt+556)+512                  /* Get asvt                   */ 
rmct=ptr(cvt+x2d('25c'))                                                
asvtmaxu=ptr(asvt+4)                   /* Get max asvt entries       */ 
Do a = 0 to asvtmaxu - 1                                                
  ascb=stg(asvt+16+a*4,4)              /* Get ptr to ascb (Skip          
                                          master)                    */ 
  If bitand(ascb,'80000000'x) = '00000000'x Then /* If in use        */ 
    Do                                                                  
      ascb=c2d(ascb)                   /* Get ascb address           */ 
      cscb=ptr(ascb+56)                /* Get CSCB address           */ 
      chtrkid=stg(cscb+28,1)           /* Check addr space type      */ 
      ascbjbni=ptr(ascb+172)           /* Get ascbjbni               */ 
      If chtrkid='03'x & ascbjbni<>0 Then                                
        Do                                                              
          oucbomvs = bitand(stg(37+ptr(ascb+144,4),1),'10'x)            
          if oucbomvs ='00'x then                                        
            do                                                          
              ascbints = stg(ascb+304,4) /* job selection time       */ 
              rmcttoc = stg(rmct+128,4) /* rmf current time          */ 
              delta=((c2d(rmcttoc)-c2d(ascbints))*1.048576)%1 /* secs*/ 
              hh=delta %3600                    /* Get # of hours    */ 
              mm=right((delta//3600)%60,2,'0')  /* get # of minutes  */ 
              ss=right((delta//3600)//60,2,'0') /* get # of seconds  */ 
              Say stg(ascbjbni,8) delta 'sec ('hh':'mm':'ss')'          
            end                                                          
        End                                                              
    End                                                                  
End                                                                      
Return                                                                  
/*-------------------------------------------------------------------*/ 
ptr:  Return c2d(storage(d2x(Arg(1)),4))     /* Return a pointer */      
/*-------------------------------------------------------------------*/ 
stg:  Return storage(d2x(Arg(1)),Arg(2))     /* Return storage */

2014年7月6日 星期日

Smallest Mainframe

Lego z114 mainframe as link

2014年6月6日 星期五

2014年6月4日 星期三

Objective-C locate file path sample

- (void)getDBpath
{
    NSString *docsDir;
    NSArray *dirPaths;
    
    // Get the documents directory
    dirPaths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
    
    docsDir = [dirPaths objectAtIndex:0];
    
    // Build the path to the database file
    databasePath = [[NSString alloc] initWithString: [docsDir stringByAppendingPathComponent: @"mainframe.db"]];
    //NSLog(@"DB full path name: %@", databasePath);
    
    NSFileManager *fileMgr = [NSFileManager defaultManager];
    BOOL success = [fileMgr fileExistsAtPath:databasePath];
    if (!success) {
        NSLog(@"Cannot locate database file '%@'.", databasePath);
    }
}

2014年5月8日 星期四

2014年5月7日 星期三

2014年4月24日 星期四

General insurance application (GENAPP) for IBM CICS TS

SupportPac CB12 demonstrates application modernization for IBM CICS Transaction Server for z/OS (CICS TS), by modeling a general insurance application. The detail refer to IBM CICS SupportPac website.

2014年3月12日 星期三

Using the CICS Explorer to monitor tasks

The CICS Explorer can very easily be used as a periscope to see what is going on in your CICS Syste, detail refer to this link.

2014年3月8日 星期六

2014年2月20日 星期四

Setsockopt

1.closesocket(一般不會立即關閉而經歷TIME_WAIT的過程)後想繼續重用該socket: BOOL bReuseaddr=TRUE; setsockopt(s,SOL_SOCKET ,SO_REUSEADDR,(const char*)&bReuseaddr,sizeof(BOOL)); 2. 如果要已經處於連接狀態的soket在調用closesocket後強制關閉,不經歷 TIME_WAIT的過程: BOOL bDontLinger = FALSE; setsockopt(s,SOL_SOCKET,SO_DONTLINGER,(const char*)&bDontLinger,sizeof(BOOL)); 3.在send(),recv()過程中有時由於網絡狀況等原因,發收不能預期進行,而設置收發時限: int nNetTimeout=1000;//1秒 //發送時限 setsockopt(socket,SOL_S0CKET,SO_SNDTIMEO,(char *)&nNetTimeout,sizeof(int)); //接收時限 setsockopt(socket,SOL_S0CKET,SO_RCVTIMEO,(char *)&nNetTimeout,sizeof(int)); 4.在send()的時候,返回的是實際發送出去的字節(同步)或發送到socket緩衝區的字節 (異步);系統默認的狀態發送和接收一次為8688字節(約為8.5K);在實際的過程中發送數據 和接收數據量比較大,可以設置socket緩衝區,而避免了send(),recv()不斷的循環收發: // 接收緩衝區 int nRecvBuf=32*1024;//設置為32K setsockopt(s,SOL_SOCKET,SO_RCVBUF,(const char*)&nRecvBuf,sizeof(int)); //發送緩衝區 int nSendBuf=32*1024;//設置為32K setsockopt(s,SOL_SOCKET,SO_SNDBUF,(const char*)&nSendBuf,sizeof(int)); 5. 如果在發送數據的時,希望不經歷由系統緩衝區到socket緩衝區的拷貝而影響 程序的性能: int nZero=0; setsockopt(socket,SOL_S0CKET,SO_SNDBUF,(char *)&nZero,sizeof(nZero)); 6.同上在recv()完成上述功能(默認情況是將socket緩衝區的內容拷貝到系統緩衝區): int nZero=0; setsockopt(socket,SOL_S0CKET,SO_RCVBUF,(char *)&nZero,sizeof(int)); 7.一般在發送UDP數據報的時候,希望該socket發送的數據具有廣播特性: BOOL bBroadcast=TRUE; setsockopt(s,SOL_SOCKET,SO_BROADCAST,(const char*)&bBroadcast,sizeof(BOOL)); 8.在client連接服務器過程中,如果處於非阻塞模式下的socket在connect()的過程中可 以設置connect()延時,直到accpet()被呼叫(本函數設置只有在非阻塞的過程中有顯著的 作用,在阻塞的函數調用中作用不大) BOOL bConditionalAccept=TRUE; setsockopt(s,SOL_SOCKET,SO_CONDITIONAL_ACCEPT,(const char*)&bConditionalAccept,sizeof(BOOL)); 9.如果在發送數據的過程中(send()沒有完成,還有數據沒發送)而調用了closesocket(),以前我們 一般采取的措施是"從容關閉"shutdown(s,SD_BOTH),但是數據是肯定丟失了,如何設置讓程序滿足具體 應用的要求(即讓沒發完的數據發送出去後在關閉socket)? struct linger { u_short l_onoff; u_short l_linger; }; linger m_sLinger; m_sLinger.l_onoff=1;//(在closesocket()調用,但是還有數據沒發送完畢的時候容許逗留) // 如果m_sLinger.l_onoff=0;則功能和2.)作用相同; m_sLinger.l_linger=5;//(容許逗留的時間為5秒) setsockopt(s,SOL_SOCKET,SO_LINGER,(const char*)&m_sLinger,sizeof(linger));

2014年1月7日 星期二

IBM product lifecycle

Up to date IBM product lifecycle information query from IBM website http://www-01.ibm.com/software/support/lifecycle/