Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Copying the Input dataset to new Output dataset

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
View previous topic :: :: View next topic  
Author Message
callkris_cit

New User


Joined: 22 Apr 2006
Posts: 44

PostPosted: Mon Jul 31, 2006 12:19 pm    Post subject: Copying the Input dataset to new Output dataset
Reply with quote

Copying the Input dataset to output dataset I have used the below REXX program.
Code:

/*rexx*/                                                                 
  "ALLOC F(IN)  DA('kv07342.file1.input') SHR"                           
  "ALLOC F(OUT) DA('kv07342.file3.input') new"                           
  'EXECIO * DISKR IN (STEM DATA. FINIS'     /* copy file into stem*/       
  'EXECIO * DISKW  OUT (STEM DATA. finis'   /* copy using stem*/         
  "FREE F(IN,OUT)"                                                       
  EXIT                                                                   


This REXX program works fine, if the Input dataset has some records. But if the input dataset is empty, output dataset created without logical record length. ( When i try to open the output dataset it says INVALID BLOCK SIZE error ).

Please let me know how to resolve this problem.
Back to top
View user's profile Send private message

Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1232
Location: Israel

PostPosted: Mon Jul 31, 2006 1:41 pm    Post subject:
Reply with quote

Try:
"ALLOC F(OUT) DA('kv07342.file3.input') NEW LIKE('kv07342.file1.input')"
Attributes from the input file will be used to define the new output file
Back to top
View user's profile Send private message
callkris_cit

New User


Joined: 22 Apr 2006
Posts: 44

PostPosted: Tue Aug 08, 2006 8:05 pm    Post subject: Re: Copying the Input dataset to new Output dataset
Reply with quote

Thanks. Its working fine.

Regards
Suresh Nallusamy
Back to top
View user's profile Send private message
srinu14165
Warnings : 1

New User


Joined: 19 Jul 2006
Posts: 8

PostPosted: Tue Aug 15, 2006 8:25 am    Post subject: Re: Copying the Input dataset to new Output dataset
Reply with quote

Hi,
I have a problem in using the above code.
It gives me the below error when I try to execute the above code for copying all the records from input dataset to output dataset

IRX0553E The input or output file IN must be allocated to a sequential data
set, or single member of a partitioned data set.
IRX0670E EXECIO error while trying to GET or PUT a record.

Can anyone Pls help me out.

Thanks
Sri
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4649
Location: Raleigh, NC, USA

PostPosted: Tue Aug 15, 2006 3:13 pm    Post subject: Re: Copying the Input dataset to new Output dataset
Reply with quote

It looks like you haven't properly allocated a QSAM dataset to IN.
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1232
Location: Israel

PostPosted: Tue Aug 15, 2006 8:37 pm    Post subject:
Reply with quote

During EXECIO:
If the file is not allocated, you receive message IRX0555E.
If the file is a PDS, you receive message IRX0552E.
If the file is VSAM, you receive message IRX0553E.

Make sure the file is not already allocated. If it is, use "FREE F(IN)" before the ALLOC.
Back to top
View user's profile Send private message
srinu14165
Warnings : 1

New User


Joined: 19 Jul 2006
Posts: 8

PostPosted: Fri Aug 18, 2006 6:29 am    Post subject: Re: Copying the Input dataset to new Output dataset
Reply with quote

yep, it was working fine

Thanks everybody
Sri
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts copying data without knowing location arunsoods DFSORT/ICETOOL 6 Thu Jul 20, 2017 1:03 pm
No new posts Browse dataset cvnlynn CLIST & REXX 4 Tue Jul 18, 2017 3:52 am
No new posts How to add header with Date(YYMMDD) i... Rajan Moorthy DFSORT/ICETOOL 2 Thu Jul 06, 2017 11:44 pm
No new posts How to generate a new unique Input fi... for1ranjith CLIST & REXX 11 Sat Jul 01, 2017 12:09 pm
No new posts JES2 doesn't honor the priority of th... Aron Lendvai JCL & VSAM 7 Thu Jun 29, 2017 1:41 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us