CRTSTMF Create a Stream File

page d'accueil
Boite à outils

Cette page a été mise à jour le
Contact

Welcome page
Tools box

Versionning 

last version : The SaveFiles

This command creates a stream file.
I've create this command because I wanted a way, as easy as F6 under PDM, to create a new file in the IFS.
In the I5/OS, creating a stream file is not the target of a command, just a side effect of copying (with CPYTOSTMF or CPYTOIMPF) or transfering (with FTP or netserver).

When I've a PC drive mapped to the IFS folder, I just have to right click in the PC explorer to create a new ASCII text file (IE a stream file).

But when I'm in a batch program, or when I'm using WRKLNK it's less easy.

I can use EDTF:
EDTF STMF('/home/jpltools/NewStreamFile.txt')

but the CCSID of the created stream file is the one of my current job IE an EBCDIC ccsid.
Bad idea for an IFS stream file. Bad idea for an IFS stream file. IFS is an ASCII /ANSI file system.


 screen :

                          Create Stream File (CRTSTMF)                          
 
                                                                               
 Type choices, press Enter.                                                     
                                                                                
 Stream file Name . . . . . . . .                                               
      
                                                                          
 Force Creation . . . . . . . . .   *YES          *YES, *NO                     
 Authority  . . . . . . . . . . .   448                                         
 Coded Character Set ID . . . . .   *JOB          Number, *JOB, *UTF8...        
 Start Edit . . . . . . . . . . .   *YES          *YES, *NO                     
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                 
        Bottom 
 F3=Exit   F4=Prompt   F5=Refresh   F12=Cancel   F13=How to use this display    
 F24=More keys                                                                 
 
 Parameter STMF required.                                                       

Help:

 

 Help                      Create stream file (help)                            
                                                                                
    
 This command is used to create a new stream file                           
                                                                                
 Stream File Name (STMF)                                                        
                                                                                
    
 STMF - the name of the stream file to create                               
                                                                                
 Force Creation (UNLINK)                                                        
                                                                                
    
 UNLINK decide what to do when the file already exists.                     
    
 *NO         when UNLINK(*NO), file is not recreated. This is to            
                
 permit to preserve previous values of Authority and            
                
 CCSID.                                                         
    
 *YES        when UNLINK(*YES), file is deleted then recreated.  This       
                
 is to assure the new file is setted with the new               
                
 Authority and CCSID.                                           
                                                                                
 Authority (AUT)                                                                
                                                                                
                                                                
        More... 
 F3=Exit help   F10=Move to top   F12=Cancel   F13=Information Assistant        
 F14=Print help                                                                 
                                                                                

 

 

 Help                      Create stream file (help)                            
                                                                                
    
 AUT Specifies the data authorities to be given to the users.  AUT is       
    
 the sum of any of these elementary values.  AUT use the UNIX api           
    
 CHMOD to apply authority                                                   
    
 *USR_READ   =256. Allow read by owner (the user who created the            
                
 stream file)                                                   
    
 *USR_WRITE  =128. Allow write by owner                                     
    
 *USR_EXEC   =64. Allow execute/search by owner                             
    
 *GRP_READ   =32. Allow read by group                                       
    
 *GRP_WRITE  =16. Allow write by group                                      
    
 *GRP_EXEC   =8. Allow execute/search by group                              
    
 *PUBLIC_READ =4. Allow read by other                                       
    
 *PUBLIC_WRITE =2. Allow write by other                                     
    
 *PUBLIC_EXECUTE =1. Allow write by other                                   
                                                                                
 Coded Character Set ID (CCSID)                                                 
                                                                                
    
 CCSID specifies the Coded Character Set Identifier of the characters       
    
 in the stream file. When opened in text mode, the I5/OS                    
                                                                  
      More... 
 F3=Exit help   F10=Move to top   F12=Cancel   F13=Information Assistant        
 F14=Print help                                                                 
                                                                                

 

 

 Help                      Create stream file (help)                            
                                                                                
    
 automatically convert characters between the stream file and the job       
    
 depending on respective CCSID's                                            
    
 *UTF8       =1208. Stream file is encoded with Unicode UTF8                
                
 characters                                                     
    
 *UTF16      =1200. Stream file is encoded with Unicode UTF16               
                
 characters                                                     
    
 *UCS2       =13488. Stream file is encoded with Unicode UCS2               
                
 characters                                                     
    
 *PCASCII    =1252. Stream file is encoded with Windows 1252                
                
 characters.  CCSID 1252 is the one of american and             
                
 west-europe windows users.  More at                            
                
 http://www-03.ibm.com/systems/i/software/globalization/        
    
 *JOB        Stream file is encoded with the same CCSID as the job's        
                
 one                                                            
    
 any value between 0 and 65535 Stream file is encoded with thid             
                
 CCSID.                                                         
                
 Note : CCSID(65535) is the CCSID(*HEXA), to be used to         
                
 mark the file as a binary file IE automatic character          
                                                                  
      More... 
 F3=Exit help   F10=Move to top   F12=Cancel   F13=Information Assistant        
 F14=Print help                                                                 
                                                                                

 

 Help                      Create stream file (help)                            
                                                                                
                
 translation by the I5/OS is forbidden.  It's to your           
                
 program to decide what to do about translation after           
                
 each read.                                                     
                                                                                
 Start Edit (EDIT)                                                              
                                                                                
    
 EDIT specifies if you want to edit the file with EDTF after a              
    
 successfull creation                                                       
    
 *NO         After creation EDIT is not started                             
    
 *YES        After creation EDIT is started                                 
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                              
           Bottom 
 F3=Exit help   F10=Move to top   F12=Cancel   F13=Information Assistant        
 F14=Print help