Mainframes run the world

Despite the excitement that has surrounded the Web and new programming models like Java and J2EE (as well as Microsoft’s .NET), older, less ‘trendy’ technologies account for the vast bulk of computer processing today.

IBM and the mainframe

IBM is the leading mainframe vendor, with over 70% market share. Therefore, while this report covers the global mainframe market – it is largely dominated by IBM.

IBM is committed to its mainframe technology

the recent release of the z/os demonstrated the fact that IBM is committed to supporting its existing clients and sees a long-term future in the platform. IBM has invested well over $1 billion in developing the z/os .

The future of the mainframe

This reports says that over the next five years the number of individual mainframe machines will fall, but the total number of deployed MIPS will continue to rise.

Key messages

The mainframe is alive and well as a platform for very large workloads.

Tuesday, May 1, 2012

Remove Multiple spaces to one in COBOL

  
 Hi Guys
 I was asked this question in some interview and find it interesting .Please check the below given program and do suggest me if you have some better solution

      identification division.
       program-id.   bdemo.

       environment division.
       input-output section.
       file-control.
           select infile assign to "../xyz/input.txt"
            organization is line sequential.
           select outfile assign to "../xyz/output.txt"
            organization is line sequential.
           select workfile assign to "../xyz/temp.txt".
                     
       data division.
       file section.
      
       fd  infile
           label records are standard
           record contains 132 characters
           data record is in-rec.

       01  in-rec.
           05  filler                       pic x(132).
       
       fd  outfile
           label records are standard
           record contains 132 characters
           data record is out-rec.
       01  out-rec.
           05 filler                        pic x(132).     
      
       working-storage section.
      
       01  ws-end-of  pic x.
           88 ws-eof   value 'Y'.
           88 ws-not-eof   value 'N'.
       01 ws-space pic x.
           88 first-char   value 'Y'.
           88 first-space  value 'N'.
          
       01  i pic 9(3) value 1.
       01  j pic 9(3) value 1.
       01  ws-left pic 9(3) value zeros.
          
                     
       linkage section.    
      
     
       procedure division .

       1000-pgm-start.
     
       display "ksingh".
      
       open input infile .
       open output outfile.
       set ws-not-eof to true.
      
      
       perform display-para until ws-EOF.
      
       close infile.
       close outfile.         
       exit program.
      
       remove-spaces.
         move 1 to i.
         move 1 to j.
         set first-space to true.
         if in-rec(i:1) = space           
            set first-space to true
         else   
            set first-char to true
         end-if.
           
         move 1 to i.
         move 1 to j.           
        
         perform 132 times
          if in-rec(i:1) = space           
            add 1 to i
            set first-space to true    
      
           else                   
              if (first-space)
                 move " " to out-rec(j:1)
                 add 1 to j
              end-if
            set first-char to true
            move in-rec(i:1) to out-rec(j:1)
            add 1 to i
            add 1 to j        
           end-if           
         end-perform.
         compute ws-left = 132 - j .
         move spaces to out-rec(j:ws-left).
         write out-rec.      
      
       remove-spaces-end.
      
       display-para.
      
       read infile at end set ws-EOF to true.
      
       if (not ws-eof)
      
       perform remove-spaces  thru
                  remove-spaces-end
            
      
       display in-rec.
      
       display-para-exit.
       exit



cob_ques