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: 6965
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: 8798
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 All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Format data from multiple records usi... SYNCSORT 4
No new posts IGYPG3178-I when compiling a pgm read... COBOL Programming 6
No new posts FileAid move data from two files to o... Compuware & Other Tools 5
No new posts Sorting date into YYYYMMDD, and creat... DFSORT/ICETOOL 13
No new posts To Sort detail records in a file with... SYNCSORT 5
Search our Forums:


Back to Top