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

Produce an extract of a VSAM file using DFSORT


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

New User


Joined: 10 Aug 2006
Posts: 23

PostPosted: Fri Sep 15, 2006 3:17 pm
Reply with quote

I am trying to extract some fields from a VSAM input file and produce a CSV output file. I have the following:

Code:

//SORTIN   DD DISP=SHR,DSN=NVM.V.BATCH.BCC   <-- VSAM FILE         
//SORTOUT  DD DISP=SHR,DSN=XQDV.SPF.SORTOUT  <-- SEQUENTIAL FILE   
//SYSIN    DD *                                                     
 SORT FIELDS=COPY                                                   
 INREC FIELDS=(1,4,C',',5,2,C',',7,3,C',',10,3,C',',13,6,C',',92,6)
 INCLUDE COND=(1,4,EQ,C'BC02')                                     
/*                                                                 


All the fields are alphanumeric.

When I run the above I get the following:

Code:

ICE805I 1 JOBNAME: XQDV0001 , STEPNAME: JS10                                             
ICE802I 0 BLOCKSET     TECHNIQUE IN CONTROL                                               
ICE201I 0 RECORD TYPE IS F - DATA STARTS IN POSITION 1                                   
ICE018A 3 INVALID OR MISSING FORMAT                                                       
ICE143I 0 BLOCKSET     COPY  TECHNIQUE SELECTED                                           
ICE000I 1 - CONTROL STATEMENTS FOR 5740-SM1, DFSORT REL 14.0 - 10:01 ON FRI SEP 15, 2006 -
           SORT FIELDS=COPY                                                               
           INREC FIELDS=(1,4,C',',5,2,C',',7,3,C',',10,3,C',',13,6,C',',92,6)             
           INCLUDE COND=(1,4,EQ,C'BC02')                                                 
ICE201I 0 RECORD TYPE IS F - DATA STARTS IN POSITION 1                                   
ICE018A 3 INVALID OR MISSING FORMAT                                                       
ICE052I 3 END OF DFSORT                                                                   
ICE185A 0 DFSORT TERMINATED WITH S322  ABEND DURING PHASE C 0                             


I'm sure it's something blindingly obvious, but wood and trees??

Help!

Thanks!
Back to top
View user's profile Send private message
UmeySan

Active Member


Joined: 22 Aug 2006
Posts: 771
Location: Germany

PostPosted: Fri Sep 15, 2006 5:09 pm
Reply with quote

Hi !

I think you have to use the RECORD statement, because you have a VSAM
dataset to be sorted.

Regards, UmeySan
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 Sep 15, 2006 9:48 pm
Reply with quote

cheetz007,

As the ICE018A says, you're missing the format in the INCLUDE statement. It should be:

Code:

    INCLUDE COND=(1,4,CH,EQ,C'BC02') 


Quote:
I think you have to use the RECORD statement, because you have a VSAM dataset to be sorted.


ICE201I 0 RECORD TYPE IS F - DATA STARTS IN POSITION 1

indicates that DFSORT defaulted the VSAM record type to F. If the VSAM records are not all the same length, then you would need to specify:

Code:

    RECORD TYPE=V


and adjust the starting positions in the control statements accordingly.

For more information on using VSAM data sets with DFSORT, see:

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

New User


Joined: 10 Aug 2006
Posts: 23

PostPosted: Fri Sep 29, 2006 7:05 pm
Reply with quote

Once again Frank - you are the man! Like I said, I knew it was something stupidly obvious!

Thanks for your help, and especially thanks for the link - I have been searching around the online manuals on and off for days trying to find this info!!
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 How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
No new posts Access to non cataloged VSAM file JCL & VSAM 18
Search our Forums:

Back to Top