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
 
Substring Search in DFSORT for Varaible Length File

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
swathykrishnan

New User


Joined: 01 Oct 2010
Posts: 43
Location: Bangalore

PostPosted: Thu Nov 22, 2012 12:27 pm    Post subject: Substring Search in DFSORT for Varaible Length File
Reply with quote

Hi

I am trying to search for a string in a variable length file. IF string found then the record should be extracted to output. My code is working fine for Fixed length files. But its not working for variable length records even if I start from 5th position
I am getting an abend U0218. And the error message is
Code:
ICE218A 6 11 BYTE VARIABLE RECORD IS SHORTER THAN 84 BYTE MINIMUM FOR          FIELDS

The sort JCL is given below
Code:

//SORTPGM  EXEC PGM=SORT                         
//SORTLIB   DD DSN=SYS1.SORTLIB,DISP=SHR         
//SYSOUT    DD SYSOUT=*                           
//SORTIN    DD DSN=ABC.DEF.JGH,DISP=SHR
//SORTOUT   DD DSN=ABC.TEST.OUT,     
//             DISP=(NEW,CATLG,DELETE),           
//             LIKE=ABC.DEF.JGH       
//SYSIN     DD *                                 
 SORT FIELDS=COPY                                 
 INCLUDE COND=(5,80,SS,EQ,C'SAS')               
/*                                               

The input file is given below
Code:

SAS MAINFRAME
MAINFRAME COBOL SAS
IBM ALLIANZ ACCENTURE
JCL SAS REPORT


[/code]
Back to top
View user's profile Send private message

bodatrinadh

Active User


Joined: 05 Jan 2007
Posts: 101
Location: chennai (India)

PostPosted: Thu Nov 22, 2012 1:00 pm    Post subject: Reply to: Substring Search in DFSORT for Varaible Length Fil
Reply with quote

Hi Swathy,

You can try this code...

Assuming LRECL=80

Code:

//SYSIN    DD *                     
  OPTION VLSCMP                     
  SORT FIELDS=COPY                 
  INCLUDE COND=(5,76,SS,EQ,C'SAS')


Thanks
-3nadh
Back to top
View user's profile Send private message
Pandora-Box

Moderator


Joined: 07 Sep 2006
Posts: 1542
Location: Andromeda Galaxy

PostPosted: Thu Nov 22, 2012 2:24 pm    Post subject:
Reply with quote

Can you please let us know the file attributes of FB and VB file ?
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7315

PostPosted: Thu Nov 22, 2012 2:42 pm    Post subject: Reply to: Substring Search in DFSORT for Varaible Length Fil
Reply with quote

If you'd looked up the message, you'd have a quicker answer than asking here.
Back to top
View user's profile Send private message
swathykrishnan

New User


Joined: 01 Oct 2010
Posts: 43
Location: Bangalore

PostPosted: Thu Nov 22, 2012 4:09 pm    Post subject:
Reply with quote

Pandora-Box wrote:
Can you please let us know the file attributes of FB and VB file ?


Its a VB file.
Back to top
View user's profile Send private message
Garry Carroll

Active Member


Joined: 08 May 2006
Posts: 998
Location: Dublin, Ireland / Edinburgh, Scotland

PostPosted: Thu Nov 22, 2012 4:42 pm    Post subject:
Reply with quote

swathykrishnan wrote:
Pandora-Box wrote:
Can you please let us know the file attributes of FB and VB file ?


Its a VB file.


... and that's one attribute.....

Garry
Back to top
View user's profile Send private message
swathykrishnan

New User


Joined: 01 Oct 2010
Posts: 43
Location: Bangalore

PostPosted: Thu Nov 22, 2012 5:00 pm    Post subject:
Reply with quote

Record format . . . : VBM
Record length . . . : 13000
Block size . . . . : 27998
1st extent tracks . : 25770
Secondary tracks . : 4520
Back to top
View user's profile Send private message
swathykrishnan

New User


Joined: 01 Oct 2010
Posts: 43
Location: Bangalore

PostPosted: Thu Nov 22, 2012 5:11 pm    Post subject: Re: Reply to: Substring Search in DFSORT for Varaible Length
Reply with quote

bodatrinadh wrote:
Hi Swathy,

You can try this code...

Assuming LRECL=80

Code:

//SYSIN    DD *                     
  OPTION VLSCMP                     
  SORT FIELDS=COPY                 
  INCLUDE COND=(5,76,SS,EQ,C'SAS')


Thanks
-3nadh




Superb... That code is working!!!!!!! Thank you...
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 records based on length exceeds ... maxsubrat DFSORT/ICETOOL 7 Wed Oct 04, 2017 4:48 pm
No new posts HEX value search in a DB2 query maxsubrat DB2 2 Wed Oct 04, 2017 3:04 pm
No new posts Execute JCL step based on the content... sprikitik JCL & VSAM 2 Tue Oct 03, 2017 10:03 am
This topic is locked: you cannot edit posts or make replies. PS file data should be passed as symb... d_sarlie JCL & VSAM 15 Tue Oct 03, 2017 5:18 am
No new posts Garbage on output file Hervey Martinez SYNCSORT 4 Wed Sep 27, 2017 12:50 am

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