View previous topic :: View next topic
|
Author |
Message |
swathykrishnan
New User
Joined: 01 Oct 2010 Posts: 43 Location: Bangalore
|
|
|
|
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 |
|
|
bodatrinadh
Active User
Joined: 05 Jan 2007 Posts: 101 Location: chennai (India)
|
|
|
|
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 |
|
|
Pandora-Box
Global Moderator
Joined: 07 Sep 2006 Posts: 1592 Location: Andromeda Galaxy
|
|
|
|
Can you please let us know the file attributes of FB and VB file ? |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
If you'd looked up the message, you'd have a quicker answer than asking here. |
|
Back to top |
|
|
swathykrishnan
New User
Joined: 01 Oct 2010 Posts: 43 Location: Bangalore
|
|
|
|
Pandora-Box wrote: |
Can you please let us know the file attributes of FB and VB file ? |
Its a VB file. |
|
Back to top |
|
|
Garry Carroll
Senior Member
Joined: 08 May 2006 Posts: 1193 Location: Dublin, Ireland
|
|
|
|
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 |
|
|
swathykrishnan
New User
Joined: 01 Oct 2010 Posts: 43 Location: Bangalore
|
|
|
|
Record format . . . : VBM
Record length . . . : 13000
Block size . . . . : 27998
1st extent tracks . : 25770
Secondary tracks . : 4520 |
|
Back to top |
|
|
swathykrishnan
New User
Joined: 01 Oct 2010 Posts: 43 Location: Bangalore
|
|
|
|
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 |
|
|
|