View previous topic :: View next topic
|
Author |
Message |
nivedita.mukherjee16
New User
Joined: 10 Jun 2011 Posts: 13 Location: Kolkata
|
|
|
|
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 |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
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 |
|
|
gylbharat
Active Member
Joined: 31 Jul 2009 Posts: 565 Location: Bangalore
|
|
|
|
Please post the error message. |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2454 Location: Hampshire, UK
|
|
|
|
Gylbharat posted:
Quote: |
Please post the error message. |
Nivi had previously posted:
Quote: |
SORTOUT INCLUDE/OMIT FIELD BEYOND RECORD |
|
|
Back to top |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
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 |
|
|
nivedita.mukherjee16
New User
Joined: 10 Jun 2011 Posts: 13 Location: Kolkata
|
|
|
|
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 |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
Back to top |
|
|
nivedita.mukherjee16
New User
Joined: 10 Jun 2011 Posts: 13 Location: Kolkata
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
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 |
|
|
nivedita.mukherjee16
New User
Joined: 10 Jun 2011 Posts: 13 Location: Kolkata
|
|
|
|
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!!!
Nivi |
|
Back to top |
|
|
nivedita.mukherjee16
New User
Joined: 10 Jun 2011 Posts: 13 Location: Kolkata
|
|
|
|
sorry to all,
I got my fault
I have missed to mention the OUTFIL |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Good to hear you found it - thank you for letting us know
d |
|
Back to top |
|
|
rakesha.hg
Active User
Joined: 21 Mar 2008 Posts: 161 Location: bangalore
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
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 |
|
|
|