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
 

 

Usage of 'OPTION VLSHRT' in sort outrec

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: Usage of 'OPTION VLSHRT' in sort outrec
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: 8593
Location: Back in jolly old England

PostPosted: Thu Aug 06, 2009 2:58 pm    Post subject:
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    Post subject: Usage of 'OPTION VLSHRT' in sort using outrec
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    Post subject: Usage of 'OPTION VLSHRT' in sort using outrec
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: 8593
Location: Back in jolly old England

PostPosted: Thu Aug 06, 2009 3:46 pm    Post subject:
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 Moderator


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

PostPosted: Thu Aug 06, 2009 8:38 pm    Post subject:
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    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 SORT to unpack a feild shr_amar DFSORT/ICETOOL 7 Fri Jul 07, 2017 4:32 am
No new posts How to write Specific Fields from Mul... Padhu SYNCSORT 6 Thu Jul 06, 2017 10:26 am
No new posts Optimize sort inrec parse vishwakotin DFSORT/ICETOOL 6 Mon Jun 26, 2017 11:15 pm
No new posts )SEL and )ENDSEL usage cvnlynn TSO/ISPF 4 Thu Jun 15, 2017 1:15 am
No new posts Reduce CPU Times for Join Sort santoshn SYNCSORT 12 Sat Jun 10, 2017 1:40 pm


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