View previous topic :: View next topic |
Author |
Message |
sarvan Beginner

Joined: 06 Aug 2007 Posts: 15 Topics: 3 Location: India
|
Posted: Tue Nov 27, 2007 4:28 am Post subject: How to use special character in an INCLUDE COND |
|
|
Following is my JCL just correct me if i am wrong
Code: | //RUNPGM EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=ABC.VSAM.LGT,DISP=SHR
//SORTOUT DD DSN=ABC.COBOL.SOURCE.LGTSORT,
// DISP=(NEW,CATLG,DELETE),UNIT=SYSDA,
// SPACE=(CYL,(20,15),RLSE),
// DCB=(RECFM=FB,LRECL=3113,BLKSIZE=31130)
//SYSIN DD *
SORT FIELDS=COPY
INCLUDE COND=(9,15,GT,C'00333224593455{')
SUM FIELDS=NONE
/* |
I RECEIVE THE FOLLOWING ERROR
Quote: | 1ICE143I 0 BLOCKSET COPY TECHNIQUE SELECTED
ICE000I 1 - CONTROL STATEMENTS FOR 5740-SM1, DFSORT REL 14.0 - 04:00 ON TUE NOV 27, 2007 -
0 SORT FIELDS=COPY
INCLUDE COND=(9,15,GT,C'00333224593455{')
SUM FIELDS=NONE
ICE201I 0 RECORD TYPE IS F - DATA STARTS IN POSITION 1
ICE018A 3 INVALID OR MISSING FORMAT
ICE052I 3 END OF DFSORT |
_________________ Thanks,
Sarvan.M |
|
Back to top |
|
 |
vkphani Intermediate

Joined: 05 Sep 2003 Posts: 483 Topics: 48
|
Posted: Tue Nov 27, 2007 4:37 am Post subject: |
|
|
Sarvan,
First of all what is your requirement? |
|
Back to top |
|
 |
sarvan Beginner

Joined: 06 Aug 2007 Posts: 15 Topics: 3 Location: India
|
Posted: Tue Nov 27, 2007 4:49 am Post subject: |
|
|
I want to sort the records of LGT (ABC.VSAM.LGT) where its time is greater than the given time ('00333224593455{') in to a new PS (ABC.COBOL.SOURCE.LGTSORT). Is that fine or should i need to give some more details. Please bear with me as i am a novice to Mainframes. _________________ Thanks,
Sarvan.M |
|
Back to top |
|
 |
vkphani Intermediate

Joined: 05 Sep 2003 Posts: 483 Topics: 48
|
Posted: Tue Nov 27, 2007 5:07 am Post subject: |
|
|
If you wann select records with time greater than 00333224593455, then use the below card. Do not include {.
Code: | INCLUDE COND=(9,14,CH,GT,C'00333224593455') |
Last edited by vkphani on Tue Nov 27, 2007 5:41 am; edited 2 times in total |
|
Back to top |
|
 |
sarvan Beginner

Joined: 06 Aug 2007 Posts: 15 Topics: 3 Location: India
|
Posted: Tue Nov 27, 2007 5:12 am Post subject: |
|
|
Umm... since the time stamp has been defined as s9(15) i am geting that " } ". I tried the way u suggested too but its not working. I am encountering the same problem.
Code: | ICE143I 0 BLOCKSET COPY TECHNIQUE SELECTED
ICE000I 1 - CONTROL STATEMENTS FOR 5740-SM1, DFSORT REL 14.0 - 05:09 ON TUE NOV 27, 2007 -
SORT FIELDS=COPY
INCLUDE COND=(9,14,GT,C'00333224593455')
SUM FIELDS=NONE
ICE201I 0 RECORD TYPE IS F - DATA STARTS IN POSITION 1
ICE018A 3 INVALID OR MISSING FORMAT
ICE052I 3 END OF DFSORT |
what to do now  _________________ Thanks,
Sarvan.M |
|
Back to top |
|
 |
vkphani Intermediate

Joined: 05 Sep 2003 Posts: 483 Topics: 48
|
Posted: Tue Nov 27, 2007 5:26 am Post subject: |
|
|
Check the syntax given in my post once. |
|
Back to top |
|
 |
sarvan Beginner

Joined: 06 Aug 2007 Posts: 15 Topics: 3 Location: India
|
Posted: Tue Nov 27, 2007 5:38 am Post subject: |
|
|
Sorry my friend. Its working now. I made a mistake in the syntax. If possible can u explain in short about the fields used in INCLUDE COND _________________ Thanks,
Sarvan.M |
|
Back to top |
|
 |
vivek1983 Intermediate

Joined: 20 Apr 2006 Posts: 222 Topics: 24
|
Posted: Tue Nov 27, 2007 5:43 am Post subject: |
|
|
sarvan,
Quote: |
If possible can u explain in short about the fields used in INCLUDE COND
|
You can go thru the "quick manuals" link at the top of this page to get started with mainframe technologies.
Following is the link from the quick manual which explains INCLUDE statement:
http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ICE1CG20/2.2.1?SHELF=&DT=20060615173822&CASE= _________________ Vivek G
--------------------------------------
A dream is just a dream. A goal is a dream with a plan and a deadline. (Harvey Mackay) |
|
Back to top |
|
 |
vkphani Intermediate

Joined: 05 Sep 2003 Posts: 483 Topics: 48
|
Posted: Tue Nov 27, 2007 5:46 am Post subject: |
|
|
sarvan,
You have to check the manual for basics. Anyway I will explain the syntax for you.
There are 5 fields in the sort card.
9 --> Starting pos of the field
14 --> Number of characters
CH --> Type of field
GT --> Greater Than
C'00333224593455' --> The actual number |
|
Back to top |
|
 |
sarvan Beginner

Joined: 06 Aug 2007 Posts: 15 Topics: 3 Location: India
|
Posted: Tue Nov 27, 2007 6:23 am Post subject: |
|
|
Thanks a lot to vivek and vkphani. _________________ Thanks,
Sarvan.M |
|
Back to top |
|
 |
Frank Yaeger Sort Forum Moderator

Joined: 02 Dec 2002 Posts: 1618 Topics: 31 Location: San Jose
|
Posted: Tue Nov 27, 2007 11:47 am Post subject: |
|
|
Sarvan,
vkphani has given you bad information.
Quote: | since the time stamp has been defined as s9(15) i am geting that "{" |
This is actually a ZD field rather than a CH field. The { in the last byte is the sign and last digit (X'C0') of the ZD value. It represents a last digit of 0 and a plus sign. So if your field has C'00333224593455{' that really represents a ZD value of +3332245934550. It would NOT be correct to test for this value with C'00333224593455'. In fact, that would result in missing the sign and last digit. The correct DFSORT INCLUDE statement would be:
Code: |
INCLUDE COND=(9,15,ZD,GT,+3332245934550)
|
Note also that:
is meaningless and ignored here since you're doing a COPY operation. SUM FIELDS=NONE works with a key so it is only meaningful for a SORT or MERGE operation. _________________ Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort |
|
Back to top |
|
 |
|
|