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
 

 

Copy KSDS file to another with different record lengths

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
sinusam

New User


Joined: 06 Jan 2004
Posts: 18

PostPosted: Fri Apr 29, 2005 9:32 am    Post subject: Copy KSDS file to another with different record lengths
Reply with quote

Copy KSDS file to another with different record lengths

36_5_7.gif

Requirement: I need to copy some records from one VSAM KSDS file into another KSDS file, where the filenames are accepted as a parameter to a cobol program.



I tried to do this by calling REPRO utility using IDCAMS, in which I specified the INDATASET and OUTDATASET as the two KSDS files respectively.

I suceeded in the following cases.


    1. When Record Length of INDATASET and OUTDATASET are identical.
    2. When Record Length of INDATASET is lesser than the OUTDATASET.

Now I need to do the following. When I tried, I got an Abend icon_cry.gif .


    1. When Record Length of INDATASET is greater than the OUTDATASET.


icon_question.gif How can I do this using REPRO ?
icon_question.gif Is there any way, other than IDCAMS - REPRO ?


Regards,
Sinu Sam
Back to top
View user's profile Send private message

Rajdeep

New User


Joined: 03 Oct 2005
Posts: 1
Location: India

PostPosted: Mon Oct 03, 2005 10:17 pm    Post subject: Re: Copy KSDS file to another with different record lengths
Reply with quote

Hi,
Using sort, you can copy the VSAM file (with greater record length) into a flat file. Use the following code snippet. The outrec parameter in the sort card gives the length to be copied from the input. I have also used some sort conditions.


Code:

//STEP010  EXEC PGM=SORT,REGION=6400K             
//SORTIN   DD DSN=VSAM FILE,                 
//         DISP=SHR                                   
//SORTOUT  DD DSN=FLAT FILE,               
//            DISP=(NEW,CATLG,DELETE),               
//            UNIT=SYSDA,                             
//            SPACE=(CYL,(2,10),RLSE),               
//            DCB=(LRECL=80,BLKSIZE=8000,RECFM=FB)   
//SYSIN    DD *                                       
       SORT FIELDS=(1,10,CH,A)                       
       INCLUDE COND=(9,1,CH,EQ,C'A',OR,9,1,CH,EQ,C'B')
       OUTREC FIELDS=(1:1,80)                         
/*
Back to top
View user's profile Send private message
Asif Iqbal

New User


Joined: 17 May 2005
Posts: 27
Location: Pune, India.

PostPosted: Thu Dec 14, 2006 4:32 pm    Post subject:
Reply with quote

Quote:
where the filenames are accepted as a parameter to a cobol program.


Could you explain this, i couldn't get u here.

Also, Rajdeep's JCL creates a 'flat file' but u need a KSDS (of smaller LRECL). So u create a KSDS cluster of smaller LRECL using IDCAMS/File-Aid and then use REPRO to copy FLAT-FILE to the newly created cluster.



Thanks,
Asif
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 -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts SORTJOIN - Copy Matched and Unmatched... Steve Ironmonger DFSORT/ICETOOL 5 Tue Jan 17, 2017 4:26 pm
No new posts HALDB data refresh/copy from producti... vineetanand2007 IMS DB/DC 0 Mon Jan 02, 2017 11:16 am
No new posts Copy RECFM =VB TO FB file with RECL =... sahil41352 DFSORT/ICETOOL 3 Wed Dec 28, 2016 11:29 pm
No new posts syncsort: copy lines after the keyword shreya19 SYNCSORT 7 Fri Dec 02, 2016 9:47 am
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm


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