View previous topic :: View next topic
Author
Message
HappySrinu Active User Joined: 22 Jan 2008Posts: 194 Location: India
have a requirement some thing like...
111 aaaa 01may07 20:30 30may07 20:10
221 bbbb 04may07 20:30 30may07 20:10
444 ccdc 01may08 20:30 30may08 20:10
444 ccdc 05may08 20:30 30may08 20:10
I am trying to use ICETOOL and want the records only having dates on MAY08.
Any suggestions pls
Back to top
karthikr44 Active User Joined: 25 Aug 2007Posts: 235 Location: Chennai
Hi,
U can use the following
Code:
SORT FIELDS=COPY
INCLUDE COND=(01,80,SS,EQ,C'MAY08')
Regards
R KARTHIK
Back to top
HappySrinu Active User Joined: 22 Jan 2008Posts: 194 Location: India
Thanks karthik but I am going to run the same job every month. for which i don't want to change every month do run it.
Is there any other way
Back to top
enrico-sorichetti Superior Member Joined: 14 Mar 2007Posts: 10886 Location: italy
this is really a different question
still somebody has to do it ( the parameter change - I mean )
make it a two step job,
the first one building dynamically the control cards
the second the real thing
or use a scheduler facilities for parameter generation
Back to top
Craq Giegerich Senior Member Joined: 19 May 2007Posts: 1512 Location: Virginia, USA
It's amazing how quickly developers have returned to 2 digit years and unsortable, uncomparable date formats.
Back to top
gcicchet Senior Member Joined: 28 Jul 2006Posts: 1702 Location: Australia
Hi,
here is one way to generate the include statement
Code:
//S1 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD *
RECORD
/*
//SORTOUT DD SYSOUT=*
//SYSIN DD *
OPTION COPY
INREC OVERLAY=(81:DATE1,
1:C' INCLUDE COND=(1,80,SS,EQ,C''',32:83,2,34:C''')')
OUTREC IFTHEN=(WHEN=(85,2,CH,EQ,C'01'),
OVERLAY=(029:C'JAN')),
IFTHEN=(WHEN=(85,2,CH,EQ,C'02'),
OVERLAY=(029:C'FEB')),
IFTHEN=(WHEN=(85,2,CH,EQ,C'03'),
OVERLAY=(029:C'MAR')),
IFTHEN=(WHEN=(85,2,CH,EQ,C'04'),
OVERLAY=(029:C'APR')),
IFTHEN=(WHEN=(85,2,CH,EQ,C'05'),
OVERLAY=(029:C'MAY')),
IFTHEN=(WHEN=(85,2,CH,EQ,C'06'),
OVERLAY=(029:C'JUN')),
IFTHEN=(WHEN=(85,2,CH,EQ,C'07'),
OVERLAY=(029:C'JUL')),
IFTHEN=(WHEN=(85,2,CH,EQ,C'08'),
OVERLAY=(029:C'AUG')),
IFTHEN=(WHEN=(85,2,CH,EQ,C'09'),
OVERLAY=(029:C'SEP')),
IFTHEN=(WHEN=(85,2,CH,EQ,C'10'),
OVERLAY=(029:C'OCT')),
IFTHEN=(WHEN=(85,2,CH,EQ,C'11'),
OVERLAY=(029:C'NOV')),
IFTHEN=(WHEN=(85,2,CH,EQ,C'12'),
OVERLAY=(029:C'DEC'))
OUTFIL BUILD=(1,80)
/*
Gerry
Back to top
Antonio Barata Warnings : 1 New User Joined: 04 Apr 2007Posts: 37 Location: Lisbon, Portugal
Quote:
It's amazing how quickly developers have returned to 2 digit years and unsortable, uncomparable date formats.
If somebody has to think about it again, it will be in 2099 and I think nobody expects to be here by the time...
But, only 9 years have passed since the end of last century and you still have to deal with those dates.
Back to top
Frank Yaeger DFSORT Developer Joined: 15 Feb 2005Posts: 7129 Location: San Jose, CA
Srini,
Assuming you want to test for monyy where mon is the current month and yy is the current year, here's a better DFSORT job to do what you asked for.
Code:
//S1 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD *
RECORD
/*
//SORTOUT DD DSN=&&S1,UNIT=SYSDA,SPACE=(TRK,(1,1)),DISP=(,PASS)
//SYSIN DD *
OPTION COPY
INREC IFOUTLEN=80,
IFTHEN=(WHEN=INIT,BUILD=(DATE2)),
IFTHEN=(WHEN=INIT,
BUILD=(C'TDATE,''',
5,2,CHANGE=(3,C'01',C'jan',C'02',C'feb',C'03',C'mar',
C'04',C'apr',C'05',C'may',C'06',C'jun',C'07',C'jul',
C'08',C'aug',C'09',C'sep',C'10',C'oct',C'11',C'nov',
C'12',C'dec'),3,2,C''''))
/*
//S2 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SYMNAMES DD DSN=&&S1,DISP=(OLD,PASS)
//SORTIN DD DSN=... input file (FB/80)
//SORTOUT DD DSN=... output file (FB/80)
//SYSIN DD *
OPTION COPY
INCLUDE COND=(1,80,SS,EQ,TDATE)
/*
Back to top
HappySrinu Active User Joined: 22 Jan 2008Posts: 194 Location: India
Thanks much for all your suggestions.
I would have mentioned before, but any way the file i have to use is LRECL=4096, BLKSIZE=4096 it's an CSV file.
Back to top
Frank Yaeger DFSORT Developer Joined: 15 Feb 2005Posts: 7129 Location: San Jose, CA
Quote:
the file i have to use is LRECL=4096
Then just change my DFSORT job to the following:
Code:
//S1 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD *
RECORD
/*
//SORTOUT DD DSN=&&S1,UNIT=SYSDA,SPACE=(TRK,(1,1)),DISP=(,PASS)
//SYSIN DD *
OPTION COPY
INREC IFOUTLEN=80,
IFTHEN=(WHEN=INIT,BUILD=(DATE2)),
IFTHEN=(WHEN=INIT,
BUILD=(C'TDATE,''',
5,2,CHANGE=(3,C'01',C'jan',C'02',C'feb',C'03',C'mar',
C'04',C'apr',C'05',C'may',C'06',C'jun',C'07',C'jul',
C'08',C'aug',C'09',C'sep',C'10',C'oct',C'11',C'nov',
C'12',C'dec'),3,2,C''''))
/*
//S2 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SYMNAMES DD DSN=&&S1,DISP=(OLD,PASS)
//SORTIN DD DSN=... input file (FB/4096)
//SORTOUT DD DSN=... output file (FB/4096)
//SYSIN DD *
OPTION COPY
INCLUDE COND=(1,4096,SS,EQ,TDATE)
/*
Back to top
HappySrinu Active User Joined: 22 Jan 2008Posts: 194 Location: India
Frank,
Thanks much.
quick clarifications again:
1. Does the input/output files should be FB or can i use VB also?
2. Does there is a way to pick exact column wise values instead of checking entire row giving as 1,4096 in input card.
Please clarify.
Back to top
Frank Yaeger DFSORT Developer Joined: 15 Feb 2005Posts: 7129 Location: San Jose, CA
Quote:
Does the input/output files should be FB or can i use VB also?
VB would be slightly different. Whereas for FB, you'd use 1,n, in the INCLUDE statement, for VB you'd use 5,n-4. You would probably also want to use VLSCMP for VB:
Quote:
Does there is a way to pick exact column wise values instead of checking entire row giving as 1,4096 in input card.
Yes, of course - that's the simpler case. You would just use:
Code:
INCLUDE COND=(p,5,EQ,EQ,TDATE)
where p is the starting position.
If you're not familiar with DFSORT and DFSORT's ICETOOL, I'd suggest reading through "z/OS DFSORT: Getting Started". It's an excellent tutorial, with lots of examples, that will show you how to use DFSORT, DFSORT's ICETOOL and DFSORT Symbols. You can access it online, along with all of the other DFSORT books, from:
Use [URL] BBCode for External Links
Back to top
HappySrinu Active User Joined: 22 Jan 2008Posts: 194 Location: India
The link is very value added Frank.
Thanks much.
Back to top
HappySrinu Active User Joined: 22 Jan 2008Posts: 194 Location: India
I am trying to us jcl
Code:
//S2 EXEC PGM=ICETOOL
//SYSOUT DD SYSOUT=*
//*SYMNAMES DD DSN=&&S1,DISP=(OLD,PASS)
//SORTIN DD DISP=SHR,DSN=XXXX.NNNN.PPPPPP
//SORTOUT DD DISP=SHR,DSN=XXXX.NNNN.PPPPPP
//SYSIN DD *
OPTION COPY VLSCMP
INCLUDE COND=(5,4092,SS,EQ,C'MAY08')
/*
XXXX.NNNN.PPPPPP - is VB length of 4096.
but unable to get the required output.
want to check with hard coding month&yr instead of generating in previous for testing purpose but RC:20
Back to top
Frank Yaeger DFSORT Developer Joined: 15 Feb 2005Posts: 7129 Location: San Jose, CA
You have PGM=ICETOOL instead of PGM=ICEMAN. PGM=ICETOOL requires different DD statements which explains why you got the RC=20 (no message data set).
It appears you are trying to use the same data set for input and output. You shouldn't do that with COPY.
Also, you have a blank instead of a comma between COPY and VLSCMP so VLSCMP is ignored as a remark.
Your job should look like this:
Code:
//S2 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//*SYMNAMES DD DSN=&&S1,DISP=(OLD,PASS)
//SORTIN DD DISP=SHR,DSN=XXXX.NNNN.PPPPPP
//SORTOUT DD DSN=... output file
//SYSIN DD *
OPTION COPY,VLSCMP
INCLUDE COND=(5,4092,SS,EQ,C'MAY08')
/*
Back to top
HappySrinu Active User Joined: 22 Jan 2008Posts: 194 Location: India
Frank,
thanks for your code, i used it end up with below message. It more looks i can't use ICEMAN on this machine.
PRODUCT LICENSED FOR CPU SERIAL NUMBER 38F4E, MODEL 2094 713
SYSIN :
OPTION COPY,VLSCMP
*
INCLUDE COND=(5,4092,SS,EQ,C'MAY08')
WER268A OPTION STATEMENT : SYNTAX ERROR
Back to top
expat Global Moderator Joined: 14 Mar 2007Posts: 8796 Location: Welsh Wales
Methinks that the WER* message codes indicates that you are using SYNCSORT not DFSORT
Back to top
Please enable JavaScript!