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

Substring Search in DFSORT for Varaible Length File


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
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
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
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

Global Moderator


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

PostPosted: Thu Nov 22, 2012 2:24 pm
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

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Thu Nov 22, 2012 2:42 pm
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
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

Senior Member


Joined: 08 May 2006
Posts: 1193
Location: Dublin, Ireland

PostPosted: Thu Nov 22, 2012 4:42 pm
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
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 1
No new posts Store the data for fixed length COBOL Programming 1
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Replace each space in cobol string wi... COBOL Programming 3
Search our Forums:

Back to Top