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
 

 

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: 755
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 Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 10 Tue May 16, 2017 2:20 pm
No new posts Check if any Detail records and extra... V S Amarendra Reddy SYNCSORT 19 Mon May 08, 2017 8:54 pm
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
No new posts Issue with NDM process to transmit ES... chetanambi All Other Mainframe Topics 6 Wed May 03, 2017 10:52 am
No new posts File processing vishwakotin Mainframe Interview Questions 9 Fri Apr 28, 2017 11:38 am


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