View previous topic :: View next topic
|
Author |
Message |
sanjayis01 Warnings : 1 New User
Joined: 13 Jun 2007 Posts: 55 Location: banaglore
|
|
|
|
Hi
Can any one let me know how to create vsam file to flat file and vice-versa using idcams or ne other method.
I tried using this
//STEP1 EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SEQGET01 DD DSN=test.chnage.TEST,DISP=SHR
//KSDPUT01 DD DSN=test.DATA.KSDPUT01,
// DISP=(NEW,CATLG,DELETE),
// UNIT=SYSDA,
// SPACE=(TRK,(10,10),RLSE),
// DCB=(RECFM=FB,LRECL=029,BLKSIZE=0)
//SYSIN DD *
REPRO INFILE(SEQGET01) OUTFILE(KSDPUT01)
/*
I am getting error
IDC3302I ACTION ERROR ON A028968.DATA.KSDPUT01
IDC3314I **RECORD OUT OF SEQUENCE - KEY FOLLOWS:
000000 C1
IDC3302I ACTION ERROR ON A028968.DATA.KSDPUT01
IDC3314I **RECORD OUT OF SEQUENCE - KEY FOLLOWS:
000000 C1
IDC3302I ACTION ERROR ON A028968.DATA.KSDPUT01
IDC3314I **RECORD OUT OF SEQUENCE - KEY FOLLOWS:
000000 C1
IDC3302I ACTION ERROR ON A028968.DATA.KSDPUT01
IDC3314I **RECORD OUT OF SEQUENCE - KEY FOLLOWS:
000000 C1
IDC3302I ACTION ERROR ON A028968.DATA.KSDPUT01
If you have JCL please post me |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
what does the IDC3314I **RECORD OUT OF SEQUENCE - hint ??
review Your understanding of VSAM KSDS organization |
|
Back to top |
|
|
sanjayis01 Warnings : 1 New User
Joined: 13 Jun 2007 Posts: 55 Location: banaglore
|
|
|
|
Its Some thing called duplicate records execeded the limit .. i guess. correct me if i m wrong |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
why not look at the manual
click on the IBM Manuals link at the top of the page
scroll down to
MVS System Messages Vol I Vol II Vol III Vol IV Vol V
the IDC messages should be in Vol III |
|
Back to top |
|
|
sanjayis01 Warnings : 1 New User
Joined: 13 Jun 2007 Posts: 55 Location: banaglore
|
|
|
|
hi i tried using this .. its working fine..
my doubt is will this affect any VSAM propetries ?
Code: |
//STEP02A EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
DEFINE -
CLUSTER -
( NAME(test.file.name1) -
VOLUMES(PRDVSM) -
INDEXED -
KEYS(14,0) -
TRACKS(30,3) -
RECORDSIZE(80,80) -
FREESPACE(10,10) -
NONSPANNED -
NOREUSE -
NOERASE -
SPEED -
SHAREOPTIONS(2,3) ) -
DATA -
( NAME(test.file.name1.DATA) -
BUFFERSPACE(20480) -
CONTROLINTERVALSIZE(4096) ) -
INDEX -
( NAME(A028968.ACAPS50.TEST.ENVI.INDEX) -
CONTROLINTERVALSIZE(2048) )
/*
//STEP2 EXEC PGM=SORT
//SORTIN DD DSN=test.file.name1,DISP=SHR
//SORTOUT DD DSN=testfile..DATA.KSDPUT01,
// DISP=(,CATLG,DELETE),
// UNIT=SYSDA,
// SPACE=(TRK,(10,10),RLSE)
//SYSIN DD *
SORT FIELDS=(1,14,BI,A)
/*
//STEP3 EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//BACKUP DD DSN=testfile.DATA.KSDPUT01,
// DISP=SHR
//NEWVSAM DD DSN=Atest.file.name1,
// DISP=OLD
//SYSIN DD *
// REPRO INFILE(BACKUP) -
// OUTFILE(NEWVSAM)
|
|
|
Back to top |
|
|
sanjayis01 Warnings : 1 New User
Joined: 13 Jun 2007 Posts: 55 Location: banaglore
|
|
|
|
please let me know answer for my question |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Quote: |
my doubt is will this affect any VSAM propetries ? |
In what way ? |
|
Back to top |
|
|
sanjayis01 Warnings : 1 New User
Joined: 13 Jun 2007 Posts: 55 Location: banaglore
|
|
|
|
like .. when i copy VSAM to FLAT file.. ..
1) how abt the key field
2) Should i give it as VB
when i copy from flat to vsam
1) how abt the key field .. how i can assign the same key field back.
2) should i give VB or FB |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
like .. when i copy VSAM to FLAT file.. ..
1) how abt the key field
What about the key field, it will still be there when the file is copied
2) Should i give it as VB
How have you defined the cluster ?
when i copy from flat to vsam
1) how abt the key field .. how i can assign the same key field back.
How did you assign it in the first place
2) should i give VB or FB
See cluster definition |
|
Back to top |
|
|
sanjayis01 Warnings : 1 New User
Joined: 13 Jun 2007 Posts: 55 Location: banaglore
|
|
|
|
so it means .. the same property will be gained again after VSAM-->FLAt-->VSAM.
Thanks for response |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Correct. |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
OK, this topic comes up so often I have to ask the question:
For a process that involves loading data from a sequential dataset into a VSAM KSDS dataset, is there any reason for a rank-and-file Analyst NOT to just use a SORT program and to skip using IDCAMS altogether? |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Tradition (that's the way we've always done it) - and - a lack of training. . . (didn't know it could be done with the sort)
d |
|
Back to top |
|
|
sanjayis01 Warnings : 1 New User
Joined: 13 Jun 2007 Posts: 55 Location: banaglore
|
|
|
|
If you could sent sample jcl for the conversion ..
that will be very helpful..
i tried using the above mentioned one ..
is there any other way .??? |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
If you could sent sample jcl for the conversion .. |
There is no "conversion" - it is a simple copy from one to the other.
Quote: |
i tried using the above mentioned one .. |
Did this work for you or were there problems?
Quote: |
is there any other way .??? |
Yes - as mentioned above you can copy to/from vsam/qsam(flat) format using the sort. If you searxh in the forum, you will find several examples. |
|
Back to top |
|
|
|