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
 

 

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: 1529
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: 7232

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: 990
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 Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts CICS Roll back partially - Need to re... dwijadas CICS 4 Wed Nov 16, 2016 4:30 pm
No new posts Problem in writing Output file vickey_dw COBOL Programming 5 Mon Nov 14, 2016 11:14 pm


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