You must be logged in to use the copy button.

        
**Free
Ctl-Opt
  Copyright('Copyright JAS, Inc.')
  Option(*SrcStmt :*NoDebugIO)  CCSID(*CHAR:*JOBRUN)
  DftActGrp(*No) ActGrp(*Caller) DecEdit(*Jobrun) ALWNULL(*USRCTL)
  BNDDIR('JASTOOL');

/define ifs_Create_File_PR
/copy qProtosrc,JSIFSTOOL

/define ifs_Write_File_PR
/copy qProtosrc,JSIFSTOOL

dcl-s w_File_Handle int(10)   inz;

// Writing a text file --------------------------------------------------------------
w_File_Handle = ifs_Create_File('/home/JSUPE' :'Test.txt');        // Create the file
ifs_Write_File(w_File_Handle : 'This is the first entry');        // Write something in the file
ifs_Write_File(w_File_Handle : 'This is the send entry');
ifs_FileClose(w_File_Handle);            

/ Writing a csv file ---------------------------------------------------------------
w_File_Handle = ifs_Create_File('/home/JSUPE' :'Test.csv');        // Create the file
ifs_Write_File(w_File_Handle :  'warehouse'
                     + ',' +  'code'
                     + ',' +  'available'
                     + ',' +  'vendorStyleId' );

ifs_Write_File(w_File_Handle :  'WHS1'
                     + ',' +  'TRX'
                     + ',' +  '300'
                     + ',' +  'SomeStyle' );                     
ifs_FileClose(w_File_Handle);                                      // Close the file                     

*Inlr = *on;