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
 

 

Creating Vsam file to Flat file and VICE-VERSA

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

New User


Joined: 13 Jun 2007
Posts: 55
Location: banaglore

PostPosted: Sat May 03, 2008 12:29 pm    Post subject: Creating Vsam file to Flat file and VICE-VERSA
Reply with quote

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
View user's profile Send private message

enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Sat May 03, 2008 12:32 pm    Post subject: Reply to: Creating Vsam file to Flat file and VICE-VERSA
Reply with quote

what does the IDC3314I **RECORD OUT OF SEQUENCE - hint ??
review Your understanding of VSAM KSDS organization
Back to top
View user's profile Send private message
sanjayis01
Warnings : 1

New User


Joined: 13 Jun 2007
Posts: 55
Location: banaglore

PostPosted: Sat May 03, 2008 12:44 pm    Post subject:
Reply with quote

Its Some thing called duplicate records execeded the limit .. i guess. correct me if i m wrong
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Sat May 03, 2008 12:54 pm    Post subject: Reply to: Creating Vsam file to Flat file and VICE-VERSA
Reply with quote

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
View user's profile Send private message
sanjayis01
Warnings : 1

New User


Joined: 13 Jun 2007
Posts: 55
Location: banaglore

PostPosted: Fri May 09, 2008 2:40 pm    Post subject:
Reply with quote

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
View user's profile Send private message
sanjayis01
Warnings : 1

New User


Joined: 13 Jun 2007
Posts: 55
Location: banaglore

PostPosted: Fri May 09, 2008 4:40 pm    Post subject:
Reply with quote

please let me know answer for my question
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Fri May 09, 2008 5:07 pm    Post subject:
Reply with quote

Quote:
my doubt is will this affect any VSAM propetries ?

In what way ?
Back to top
View user's profile Send private message
sanjayis01
Warnings : 1

New User


Joined: 13 Jun 2007
Posts: 55
Location: banaglore

PostPosted: Fri May 09, 2008 5:12 pm    Post subject:
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Fri May 09, 2008 5:47 pm    Post subject:
Reply with quote

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
View user's profile Send private message
sanjayis01
Warnings : 1

New User


Joined: 13 Jun 2007
Posts: 55
Location: banaglore

PostPosted: Fri May 09, 2008 5:49 pm    Post subject:
Reply with quote

so it means .. the same property will be gained again after VSAM-->FLAt-->VSAM.


Thanks for response
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Fri May 09, 2008 5:51 pm    Post subject:
Reply with quote

Correct.
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4648
Location: Raleigh, NC, USA

PostPosted: Fri May 09, 2008 7:40 pm    Post subject: Reply to: Creating Vsam file to Flat file and VICE-VERSA
Reply with quote

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
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Sat May 10, 2008 3:19 am    Post subject: Reply to: Creating Vsam file to Flat file and VICE-VERSA
Reply with quote

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
View user's profile Send private message
sanjayis01
Warnings : 1

New User


Joined: 13 Jun 2007
Posts: 55
Location: banaglore

PostPosted: Wed May 14, 2008 6:20 pm    Post subject:
Reply with quote

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
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Wed May 14, 2008 7:14 pm    Post subject:
Reply with quote

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
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 Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts CICS Roll back partially - Need to re... dwijadas CICS 4 Wed Nov 16, 2016 4:30 pm
No new posts Problem in writing Output file vickey_dw COBOL Programming 5 Mon Nov 14, 2016 11:14 pm


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