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
 

 

Problem while putting condition in a VB file using SORT

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
nivedita.mukherjee16

New User


Joined: 10 Jun 2011
Posts: 13
Location: Kolkata

PostPosted: Mon Dec 05, 2011 6:59 pm    Post subject: Problem while putting condition in a VB file using SORT
Reply with quote

Hi All,

I am trying to write a SORT where I need to select few records depending on record type and name from a VB file into a FB file

The record layout of my file is:
1 FILE1,
3 RECTYP CHAR (03),
3 FILLER1 CHAR (37),
3 NAME CHAR (04);

If I first convert the file to FB then try to inculde the condition it is wrorking fine

//SYSIN DD *
SORT FIELDS=COPY
INCLUDE COND=(5,3,CH,EQ,C'XYZ'),
OUTREC FILEDS=(5,1496,1500:X),CONVERT
//
and then use

//SYSIN DD *
SORT FIELDS=COPY
INCLUDE COND=(41,4,CH,EQ,C'ABCD')
//


But if I try to put the NAME condition while converting the VB to FB it is giving me error as

SORTOUT INCLUDE/OMIT FIELD BEYOND RECORD

//SYSIN DD *
SORT FIELDS=COPY
INCLUDE COND=(5,3,CH,EQ,C'XYZ',AND,45,4,CH,EQ,C'ABCD'),
OUTREC FILEDS=(5,1496,1500:X),CONVERT
//


Please suggest how can I solve this problem.


Thanks,
Nivi
Back to top
View user's profile Send private message

Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7223

PostPosted: Mon Dec 05, 2011 7:07 pm    Post subject: Reply to: Problem while putting condition in a VB file using
Reply with quote

The INCLUDE is processed before the OUTREC.

You have records shorter than your key (presumably the second element).

Your OUTREC is extending all records to a fixed length, your INCLUDE seperately after that does not cause you a problem.

The curious thing is that it would imply you have short XYZ record(s), of which you are presumably unaware.
Back to top
View user's profile Send private message
gylbharat

Active Member


Joined: 31 Jul 2009
Posts: 565
Location: Bangalore

PostPosted: Mon Dec 05, 2011 8:14 pm    Post subject:
Reply with quote

Please post the error message.
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 1712
Location: UK

PostPosted: Mon Dec 05, 2011 9:19 pm    Post subject:
Reply with quote

Gylbharat posted:
Quote:
Please post the error message.


Nivi had previously posted:
Quote:
SORTOUT INCLUDE/OMIT FIELD BEYOND RECORD
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1703
Location: Australia

PostPosted: Tue Dec 06, 2011 7:46 am    Post subject:
Reply with quote

Hi,

it would help if you cut and paste your job and use Code so it becomes readable.


This statement has a comma at the end which would give an error
Code:
INCLUDE COND=(5,3,CH,EQ,C'XYZ',AND,45,4,CH,EQ,C'ABCD'),


This statement also has an error in it, FILEDS should be FIELDS
Code:
OUTREC FILEDS=(5,1496,1500:X),CONVERT


Now, after you have corrected your typos, you can try running the job with this
Code:
//STEP0001 EXEC PGM=SORT,PARM='VLTESTI=1'     



Gerry
Back to top
View user's profile Send private message
nivedita.mukherjee16

New User


Joined: 10 Jun 2011
Posts: 13
Location: Kolkata

PostPosted: Tue Dec 06, 2011 10:38 am    Post subject:
Reply with quote

Hi,


Thanks a lot Gerry!!
It is working now.
It will really be helpful if you can explain what does this parm field do or
suggest any manual where I can get informations like this.


Thanks again
Nivi
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1703
Location: Australia

PostPosted: Tue Dec 06, 2011 10:46 am    Post subject:
Reply with quote

Hi,

a search would have given plenty of hits

http://ibmmainframes.com/viewtopic.php?t=49970&highlight=vltesti

If you have SYNCSORT installed then you should obtain a copy of the manual.

Gerry
Back to top
View user's profile Send private message
nivedita.mukherjee16

New User


Joined: 10 Jun 2011
Posts: 13
Location: Kolkata

PostPosted: Tue Dec 06, 2011 11:12 am    Post subject:
Reply with quote

Thanks again Gerry!!!!!
I went through them

What I obtained is:

Quote:
When VLTESTI=1 is specified, a record that does not completely contain all INCLUDE/ OMIT fields is treated as having failed the comparison. SyncSort will omit the record if INCLUDE is being used or include the record if OMIT
has been specified.

When VLTESTI=2 is specified, SyncSort will treat comparisons to fields not completely contained within the record as false and decide a record's status for inclusion or omission from fields that are available. If all fields are not present, the record will be processed as having failed the comparison.

I am not very clear about this.
Can you please help me out to make it out.SyncSort will omit the record if INCLUDE is being used or include the recordif OMIT has been specified.
I also went through the link you specified

Thanks for helping!!!
Nivi
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Tue Dec 06, 2011 11:33 am    Post subject:
Reply with quote

Hello,

Now that you have the info, suggest you run a few experiments and learn what really happens.

What you have posted looks rather clear. Where are you stuck?
Back to top
View user's profile Send private message
nivedita.mukherjee16

New User


Joined: 10 Jun 2011
Posts: 13
Location: Kolkata

PostPosted: Tue Dec 06, 2011 12:21 pm    Post subject:
Reply with quote

Hi,


I have got another query:
I am trying to create a trailer record using the following SORT CARD

Code:
  SORT FIELDS=COPY                                         
  TRAILER1=(1:'TRL',37X,41:COUNT=(TO=PD,LENGTH=11),225X)   



But it is giving me error as

Code:
 WER275A  NO KEYWORDS FOUND ON CONTROL STATEMENT 


Please help me to resolve this one


Thanks for helping!!! icon_smile.gif
Nivi
Back to top
View user's profile Send private message
nivedita.mukherjee16

New User


Joined: 10 Jun 2011
Posts: 13
Location: Kolkata

PostPosted: Tue Dec 06, 2011 12:38 pm    Post subject:
Reply with quote

sorry to all,

I got my fault

I have missed to mention the OUTFIL
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Wed Dec 07, 2011 10:32 am    Post subject: Reply to: Problem while putting condition in a VB file using
Reply with quote

Good to hear you found it - thank you for letting us know icon_smile.gif

d
Back to top
View user's profile Send private message
rakesha.hg

Active User


Joined: 21 Mar 2008
Posts: 161
Location: bangalore

PostPosted: Mon Jan 02, 2012 5:10 pm    Post subject: Reply to: Problem while putting condition in a VB file using
Reply with quote

This is my personal opinion, suggest we put information regarding VLTESTI = 1 & 2 in sticky part of this forum .... from the posts i read about syncsort involving VB files, Parm option VLTESTI seems to be the answer most of the times.

Moderators out there take your call.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Tue Jan 03, 2012 11:52 am    Post subject:
Reply with quote

Hello,

If you post what you would like to see as the content of this sticky, we would review this and split your contribution to a new Sticky.
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 -> JCL & VSAM 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 Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 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


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