Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 1243
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: 4650
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: 1243
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 Subtract the ZD fields to provide neg... Balaryan DFSORT/ICETOOL 4 Wed Oct 11, 2017 10:51 pm
No new posts Copy 4 byte of data from the last rec... arunsoods DFSORT/ICETOOL 9 Fri Oct 06, 2017 12:15 pm
No new posts opening a dataset after reading it fr... arunsoods DFSORT/ICETOOL 5 Wed Oct 04, 2017 3:54 pm
No new posts Where is output from PARM ABEXIT (SNA... packerm CA Products 3 Thu Sep 28, 2017 4:06 pm
No new posts Garbage on output file Hervey Martinez SYNCSORT 4 Wed Sep 27, 2017 12:50 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us