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
 

 

selective copy from the TAPE file

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
Truptib

New User


Joined: 16 Apr 2005
Posts: 3

PostPosted: Tue Apr 19, 2005 12:08 pm    Post subject: selective copy from the TAPE file
Reply with quote

Hi,
I want to copy data for a list of policies from a Tape file to a flat file. I can use a sort card but the sort card will be unnecessarily too long. I have a flat file having only the list of policies.
Can anyone guide me how can i Do this using the file instead of the job, Currently I am using JCL as follows:

//CPYSLTTP JOB (FCLA-FCL0000),'SELECTIVE COPY ',
// CLASS=C,MSGCLASS=R,NOTIFY=&SYSUID
//*
//JOBLIB DD DSN=PROD.CLF.LOADLIB,DISP=SHR
// DD DSN=MODL.CLF.LOADLIB,DISP=SHR
//*
//SRTSTEP EXEC PGM=SORT
//SORTIN DD DSN=PLF.NXX.SECURE.POLICY.EOQ.G0023V00,
// DISP=SHR
//SORTOUT DD DSN=F6925.VXX.POLICY.REPRO,
// DISP=(NEW,CATLG,DELETE),UNIT=SYSDA,
// SPACE=(CYL,(2,2)),
// DCB=(LRECL=300,BLKSIZE=32700,RECFM=FB)
//SORTWK01 DD UNIT=SYSDA,SPACE=(CYL,(5,5),RLSE)
//SORTWK02 DD UNIT=SYSDA,SPACE=(CYL,(5,5),RLSE)
//SORTWK03 DD UNIT=SYSDA,SPACE=(CYL,(5,5),RLSE)
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSIN DD *
SORT FIELDS=COPY
INCLUDE COND=(9,7,CH,EQ,C'M291761',OR,9,7,CH,EQ,C'M293720',OR,
9,7,CH,EQ,C'M294632',OR,9,7,CH,EQ,C'M294674',OR,
9,7,CH,EQ,C'M295301',OR,9,7,CH,EQ,C'M295305',OR,
9,7,CH,EQ,C'M500078')
/*
Back to top
View user's profile Send private message

andycool

New User


Joined: 12 Apr 2005
Posts: 64

PostPosted: Tue Apr 19, 2005 7:41 pm    Post subject:
Reply with quote

IEBGENER is one way to copy any dataset.

i cant give u the code but m sure some1 will.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Tue Apr 19, 2005 8:37 pm    Post subject:
Reply with quote

Some comments on your current job:

Remove the //SORTWKdd DD statements - work data sets are NOT needed for a COPY, so you're just wasting space.

You can rewrite your INCLUDE statement like this to make it simpler:

Code:

 INCLUDE FORMAT=SS,COND=(9,7,EQ,
  C'M291761,M293720,M294632,M294674,M295301,M295305,M500078')


If you want me to show you how to use DFSORT to select the records using a file with the policy numbers, show me an example of what the records in the policy file and the input file look like, and what you want the output records to look like. If the input file can have records with duplicate policy numbers, show that in the example. Also, what is the RECFM and LRECL of the policy file and the input file?
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Tue Apr 19, 2005 8:39 pm    Post subject:
Reply with quote

Andy,

IEBGENER can copy a file, but as far as I know, it can't select records in the way Truptib wants to.
Back to top
View user's profile Send private message
Truptib

New User


Joined: 16 Apr 2005
Posts: 3

PostPosted: Wed Apr 20, 2005 9:13 am    Post subject: Re: selective copy from the TAPE file
Reply with quote

:) Hi guys,
Thanks a lot for your inputs. Thanks for also optimizing my code.
have a nice day,
Trupti
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 -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
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 TAPE VERIFY utility?? MrExtraordinare JCL & VSAM 3 Fri Dec 09, 2016 10:57 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