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
 

 

JCL: How to convert a PS file into a VSAM file?

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

New User


Joined: 17 Nov 2005
Posts: 60

PostPosted: Mon Jun 05, 2006 11:32 am    Post subject: JCL: How to convert a PS file into a VSAM file?
Reply with quote

Hi, anybody could help me on this? Thank you so much!

PS layout:
field 1 (will be the key of vsam)
field 2
...
field n

VSAM layout:
field 1 (the key)
field 2
...
field n
Back to top
View user's profile Send private message

DavidatK

Active Member


Joined: 22 Nov 2005
Posts: 700
Location: Troy, Michigan USA

PostPosted: Tue Jun 06, 2006 12:42 am    Post subject: Re: JCL: How to convert a PS file into a VSAM file?
Reply with quote

What is the record length, and what is the definition of the Key field?

Dave
Back to top
View user's profile Send private message
DavidatK

Active Member


Joined: 22 Nov 2005
Posts: 700
Location: Troy, Michigan USA

PostPosted: Tue Jun 06, 2006 12:43 am    Post subject: Re: JCL: How to convert a PS file into a VSAM file?
Reply with quote

And the location of the Key field in the record
Back to top
View user's profile Send private message
Lord.of.Wind

New User


Joined: 17 Nov 2005
Posts: 60

PostPosted: Tue Jun 06, 2006 6:49 am    Post subject:
Reply with quote

Appriciate your reply, thank you!

01 RMRELN-REC.
05 OUT7-CUSTNUMB PIC 9(09).
05 OUT7-RELN-NUMB PIC 9(09).
05 OUT7-PP-ACCTNUMB PIC X(20).
05 OUT7-PP-PRODTYPE PIC X(05).

OUT7-CUSTNUMB is the key. Total length is 43.
Back to top
View user's profile Send private message
parikshit123

Active User


Joined: 01 Jul 2005
Posts: 269
Location: India

PostPosted: Tue Jun 06, 2006 12:22 pm    Post subject:
Reply with quote

Hi,

You can use IDCAMS to convert (rather copy) a sequential file to VSAM KSDS cluster.

One way to do that is to write DELETE, DEFINE CLUSTER and REPRO steps in your JCL.

1. delete if cluster exists.
2. Define a new cluster with record length and keys information.
3. copy from PS file to newly defined KSDS cluster in 2nd step.

Thanks,
Parikshit
Back to top
View user's profile Send private message
prasadvrk

Active User


Joined: 31 May 2006
Posts: 200
Location: Netherlands

PostPosted: Tue Jun 06, 2006 4:06 pm    Post subject:
Reply with quote

Supply you job card, file name and PS file name in the following JCL and execute., let me know if you have any problem.

SUPPLY YOUR JOBCARD HERE
//DDACTMST EXEC PGM=IDCAMS
//SYSIN DD *
DELETE FILE NAME SCRATCH
SET MAXCC=00
DEFINE CLUSTER-
(NAME(FILE NAME)-
FREESPACE(0 5)-
INDEXED-
KEYS(9 0)-
RECORDSIZE(43 43)-
SPEED-
DATACLAS(VSAMNOCP) -
SHAREOPTIONS(2 3)-
CYL (5 5)-
NONSPANNED)-
DATA-
(NAME(FILE NAME.DATA)-
CONTROLINTERVALSIZE(4096))-
INDEX-
(NAME(FILE NAME.INDEX)-
CONTROLINTERVALSIZE(1024))
/*

//REPRO1 EXEC PGM=IDCAMS
//SYSUT1 DD DSN=PS NAME,DISP=SHR
//SYSUT2 DD DSN=FILE NAME,DISP=SHR
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSIN DD *
REPRO INFILE(SYSUT1) OUTFILE(SYSUT2)
/*
Back to top
View user's profile Send private message
rdr

New User


Joined: 26 May 2006
Posts: 35
Location: india

PostPosted: Thu Jul 06, 2006 11:52 am    Post subject:
Reply with quote

Hi,

We can use SORT utility to achive the same.
In sort input is flat file,
output is vsam file,
Options are --

Copy,
Sum feilds = none, to eliminate the duplicate, if any....

Correct me if I am wrong...
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 Fail to change physical VSAM filename... jacobdng CICS 6 Fri Jan 20, 2017 12:36 pm
No new posts SORTJOIN - Copy Matched and Unmatched... Steve Ironmonger DFSORT/ICETOOL 5 Tue Jan 17, 2017 4:26 pm
No new posts how to recover an uncataloged VSAM da... archanamuthukrishnan All Other Mainframe Topics 3 Wed Jan 11, 2017 6:18 pm
No new posts Underlying DB2 VSAM LDS - SMF recording vasanthz All Other Mainframe Topics 6 Thu Jan 05, 2017 4:20 am
No new posts Copy RECFM =VB TO FB file with RECL =... sahil41352 DFSORT/ICETOOL 3 Wed Dec 28, 2016 11:29 pm


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