MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How to use special character in an INCLUDE COND

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL)
View previous topic :: View next topic  
Author Message
sarvan
Beginner


Joined: 06 Aug 2007
Posts: 15
Topics: 3
Location: India

PostPosted: Tue Nov 27, 2007 4:28 am    Post subject: How to use special character in an INCLUDE COND Reply with quote

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
View user's profile Send private message Yahoo Messenger
vkphani
Intermediate


Joined: 05 Sep 2003
Posts: 483
Topics: 48

PostPosted: Tue Nov 27, 2007 4:37 am    Post subject: Reply with quote

Sarvan,

First of all what is your requirement?
Back to top
View user's profile Send private message Send e-mail
sarvan
Beginner


Joined: 06 Aug 2007
Posts: 15
Topics: 3
Location: India

PostPosted: Tue Nov 27, 2007 4:49 am    Post subject: Reply with quote

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
View user's profile Send private message Yahoo Messenger
vkphani
Intermediate


Joined: 05 Sep 2003
Posts: 483
Topics: 48

PostPosted: Tue Nov 27, 2007 5:07 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
sarvan
Beginner


Joined: 06 Aug 2007
Posts: 15
Topics: 3
Location: India

PostPosted: Tue Nov 27, 2007 5:12 am    Post subject: Reply with quote

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 Sad Question
_________________
Thanks,

Sarvan.M
Back to top
View user's profile Send private message Yahoo Messenger
vkphani
Intermediate


Joined: 05 Sep 2003
Posts: 483
Topics: 48

PostPosted: Tue Nov 27, 2007 5:26 am    Post subject: Reply with quote

Check the syntax given in my post once.
Back to top
View user's profile Send private message Send e-mail
sarvan
Beginner


Joined: 06 Aug 2007
Posts: 15
Topics: 3
Location: India

PostPosted: Tue Nov 27, 2007 5:38 am    Post subject: Reply with quote

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
View user's profile Send private message Yahoo Messenger
vivek1983
Intermediate


Joined: 20 Apr 2006
Posts: 222
Topics: 24

PostPosted: Tue Nov 27, 2007 5:43 am    Post subject: Reply with quote

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
View user's profile Send private message
vkphani
Intermediate


Joined: 05 Sep 2003
Posts: 483
Topics: 48

PostPosted: Tue Nov 27, 2007 5:46 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
sarvan
Beginner


Joined: 06 Aug 2007
Posts: 15
Topics: 3
Location: India

PostPosted: Tue Nov 27, 2007 6:23 am    Post subject: Reply with quote

Thanks a lot to vivek and vkphani.
_________________
Thanks,

Sarvan.M
Back to top
View user's profile Send private message Yahoo Messenger
Frank Yaeger
Sort Forum Moderator
Sort Forum Moderator


Joined: 02 Dec 2002
Posts: 1618
Topics: 31
Location: San Jose

PostPosted: Tue Nov 27, 2007 11:47 am    Post subject: Reply with quote

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:

Code:

   SUM FIELDS=NONE     


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
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL) All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group