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.