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

Usage of 'OPTION VLSHRT' in sort outrec


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

New User


Joined: 30 Mar 2007
Posts: 25
Location: Hyderabad

PostPosted: Thu Aug 06, 2009 2:48 pm
Reply with quote

Hi,

Am using sort utility with input file of variable length records.
I just want to copy records which satisfy condition.

Below is my Sysin,

Here When i use the below sysin with out option VLSHRT am getting RC=16. when i use below sysin with the option the job executing successfully.

Code:

//SYSIN    DD  *                               
      OPTION VLSHRT                           
      SORT FIELDS=COPY                         
       INCLUDE COND=((5,3,CH,EQ,C'C03'),AND, 
                                  (26,4,CH,EQ,C'5100',OR, 
                                   26,4,CH,EQ,C'5200',OR, 
                                   26,4,CH,EQ,C'5201',OR, 
                                   26,4,CH,EQ,C'5202'))   
 /*                                             


however when i use outrec along the above sysin am getting RC=0016, even though am using option VLSHRT.

Code:

//SYSIN    DD  *                               
      OPTION VLSHRT                           
      SORT FIELDS=COPY                         
       INCLUDE COND=(((5,3,CH,EQ,C'C02',OR,   
                       5,3,CH,EQ,C'C04'),AND, 
                      (22,4,CH,EQ,C'5100',OR, 
                       22,4,CH,EQ,C'5200',OR, 
                       22,4,CH,EQ,C'5201',OR, 
                       22,4,CH,EQ,C'5202')),OR,
                     ((5,3,CH,EQ,C'C03'),AND, 
                      (26,4,CH,EQ,C'5100',OR, 
                       26,4,CH,EQ,C'5200',OR, 
                       26,4,CH,EQ,C'5201',OR, 
                       26,4,CH,EQ,C'5202')))   
        OUTREC FIELDS=(8,4)                   
/*                                       


Code:

ICE201I E RECORD TYPE IS V - DATA STARTS IN POSITION 5                         
ICE150I 0 VLSHRT NOT USED FOR SORT, MERGE, INCLUDE, OMIT OR SUM STATEMENT FIELDS
ICE126A 0 INCONSISTENT *OUTREC  IFTHEN 0 REFORMATTING FIELD FOUND               
ICE751I 0 C5-K26318 C6-K90007 C7-K90000 C8-K23476 E9-K90007 E7-K24705           
ICE052I 3 END OF DFSORT                                                         


Please let me know how to overcome this problem.

Thanks in advance,
Ram.
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Thu Aug 06, 2009 2:58 pm
Reply with quote

Have you tried using VLSCMP instead ?

Take a look at copying a VB file topic.

Which SORT product are you using.
Back to top
View user's profile Send private message
Rambhupal.chaudari

New User


Joined: 30 Mar 2007
Posts: 25
Location: Hyderabad

PostPosted: Thu Aug 06, 2009 3:25 pm
Reply with quote

Hi Expat,

Am using IBM sort product.

Thank you,
Ram
Back to top
View user's profile Send private message
Rambhupal.chaudari

New User


Joined: 30 Mar 2007
Posts: 25
Location: Hyderabad

PostPosted: Thu Aug 06, 2009 3:30 pm
Reply with quote

Hi Expat,

I have used the option = VLSCMP also, eventhough i got same error.

when i use outrec or inrec with input as variable length records, am getting this error.

Thanks,
Ram.
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Thu Aug 06, 2009 3:46 pm
Reply with quote

Code:
OUTREC FIELDS=(8,4)

What exactly do you want as output from the sort ?

Also, what is the RECF and LRECL of the input dataset
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: Thu Aug 06, 2009 8:38 pm
Reply with quote

Quote:
ICE201I E RECORD TYPE IS V - DATA STARTS IN POSITION 5


Since your input file has RECFM=VB, you need to specify the RDW in your OUTREC statement, e.g.

Code:

   OUTREC FIELDS=(1,4,8,4)


Remember that the first data byte starts in position 5 after the RDW so if if 8 is the eigth data byte, you need to specify 12 (8+4) rather than 8.
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 Need to set RC4 through JCL SORT DFSORT/ICETOOL 5
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts JCL sort card - get first day and las... JCL & VSAM 9
No new posts SCOPE PENDING option -check data DB2 2
No new posts Sort First/last record of a subset th... DFSORT/ICETOOL 7
Search our Forums:

Back to Top