Attached is a sample program that does both. It is quite old, and I
don't know if it still works, but there is no particular reason why it
shouldn't.

 

Peter

 

-----Original Message-----
From: The IBM z/VM Operating System [mailto:[email protected]] On
Behalf Of Sergio Lima
Sent: August 16, 2010 15:52
To: [email protected]
Subject: Assembler Samples

 

Hello List,
 
Years ago, We wrote a lot of Assembler programs and unfortunattely lost
all of them.
 
Now, We try write a sample program, and need know, if someone, have a
FSWRITE sample program, ans how get the date of the system.
 
My program is something like this :
 
CPUVM1   CSECT                                                       
         USING     CPUVM1,3                                          
         LR        3,15                                              
         ST        14,SAVE14                                         
         MVC       FSCBI+16(8),=CL8'1608    '                        
         MVC       FSCBO+16(8),=CL8'1608    '                        
         FSOPEN    FSCB=FSCBI                                        
*                                                                    
LEITURA  FSREAD    FSCB=FSCBI,ERROR=FINAL                            
         WRTERM    INAREA,80                                         
         CLC       INAREA+19(8),=CL8'AVGPROC-'                       
         BNE       LEITURA                                           
         BAL       10,GRAVA                                          
         MVC       INAREA,BRANCOS                                    
         B         LEITURA                                           
*                                                                    
FINAL    C         15,=F'12'                                         
         BE        SAI                                               
         WRTERM    'ERRO NA LEITURA DO ARQUIVO'                      
*                                                                    
SAI      L         14,SAVE14                                         
         SR        15,15                                             
         BR        14                                                
*                                                                    
GRAVA    MVC       OUTAREA,INAREA                                    
         LA        7,OUTAREA                                         
         FSWRITE   FSCB=FSCBO,RECNO=(7),ERROR=ERROGRAV               
         MVC       OUTAREA,BRANCOS                                   
         BR        10                                                
*                                                                    
ERROGRAV WRTERM    'ERRO NA GRAVACAO DO ARQUIVO'                        
         B         SAI                                                  
*                                                                       
SAVE14   DS        F                                                    
INAREA   DS        CL85                                                 
OUTAREA  DS        CL85                                                 
BRANCOS  DC        CL85' '                                              
FSCBI    FSCB      'CPUVM  ........ Z',BUFFER=INAREA,RECFM=V            
FSCBO    FSCB      'CPUVM  ........ A',BUFFER=OUTAREA,RECFM=V           
         FSCBD                                                          
         END       CPUVM1                                               
 
The sample program above, had a error when try use the FSWRITE (not
error, but rc <> 0).
 
Any help please ?
 
Thanks
 
Sergio Lima Costa
Sao Paulo - Brazil



The information transmitted is intended only for the person or entity to which 
it is addressed and may contain confidential and/or privileged material.  Any 
review retransmission dissemination or other use of or taking any action in 
reliance upon this information by persons or entities other than the intended 
recipient or delegate is strictly prohibited.  If you received this in error 
please contact the sender and delete the material from any computer.  The 
integrity and security of this message cannot be guaranteed on the Internet.  
The sender accepts no liability for the content of this e-mail or for the 
consequences of any actions taken on the basis of information provided.  The 
recipient should check this e-mail and any attachments for the presence of 
viruses.  The sender accepts no liability for any damage caused by any virus 
transmitted by this e-mail.  This disclaimer is property of the TTC and must 
not be altered or circumvented in any manner.

Reply via email to