Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Produce an extract of a VSAM file using DFSORT

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: Produce an extract of a VSAM file using DFSORT
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: 757
Location: Germany

PostPosted: Fri Sep 15, 2006 5:09 pm    Post subject:
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 Moderator


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

PostPosted: Fri Sep 15, 2006 9:48 pm    Post subject:
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:

http://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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts IDCAMS RENAMING VSAM FILE ALONG WITH ... upendrasri JCL & VSAM 11 Tue Apr 17, 2018 10:42 pm
No new posts VSAM file NOT Found error while proce... SumaReva CICS 5 Wed Apr 11, 2018 9:54 pm
No new posts VSAM - Accessing beyond record size Benchwarmer JCL & VSAM 6 Wed Apr 11, 2018 9:20 pm
No new posts converting a mainframe file with ASA ... Lynne Schuler All Other Mainframe Topics 5 Wed Apr 04, 2018 9:44 am
No new posts Extract the records with a PD field's... sudhakar84 DFSORT/ICETOOL 11 Mon Apr 02, 2018 7:26 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us