IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Issue when copying data from flat file to a VSAM file


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
jgantena

New User


Joined: 13 Aug 2008
Posts: 8
Location: Hyderabad

PostPosted: Fri Apr 08, 2011 11:53 am
Reply with quote

Hi All,

Can someone help me out in resolving the query.

I m trying to copy data from Flat file of variable length to VSAM file of variable length, i me getting issue like VSAM logical error.

1)Initially i copied data from a VSAM file which is a VB length file(123 bytes) to a flat file of length 145 bytes with recfm VB.
For that i added 4 bytes additional to my actual file length like below

//SORTIN DD DSN=DARN1.VSO.DCR1.AMNK1,DISP=SHR
//SORTOUT DD DSN=DARN1.FFB.DCR1.AMNKA.SORT,
// DISP=(NEW,CATLG,DELETE),
// SPACE=(CYL,(10,5),RLSE),
// DCB=(RECFM=VB,LRECL=149)

while copying i kept condition like SUM FIELDS=NONE to remove duplicates. Then all the recs were copied.

2)Now when i try to copy data from the above flat file to a new VSAM file which is defined with below parameters
RECORDSIZE ( 105 145 )
KEYS ( 40 0 )

getting a VSAM logical error after some records are copied into VSAM file.

When i manually check the input flat file,there were no duplicates also.

Could some help on this.

regards,
jai
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Fri Apr 08, 2011 12:13 pm
Reply with quote

1. i have found that, when using sort, i am better off not specifiying lrecel ,
sort does a much better job of calculating the lrecl than I do.

2. had you done the above, you could have used sort to copy the flat file back.

3. have you insured that the new vsam is defined exactly as the originial. (the define parms should have used model).
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


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

PostPosted: Fri Apr 08, 2011 10:12 pm
Reply with quote

Jayadev,

You haven't really given enough information about what you did, and what you're trying to do, for me to help you.

You might be able to help yourself by reading about how DFSORT processes VSAM files at:

publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ICE1CA50/1.8.3.4?SHELF=&DT=20100630155256&CASE=
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Sat Apr 09, 2011 12:58 pm
Reply with quote

You also need to post all of the error messages AND codes that were issued by the failing job.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Store the data for fixed length COBOL Programming 1
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
Search our Forums:

Back to Top