View previous topic :: View next topic
|
Author |
Message |
Singaram
New User
Joined: 19 Aug 2009 Posts: 19 Location: India
|
|
|
|
Im having a backup file from which I have to pull in data for a single date and write to o/p file. Currently date is supplied through jcl parm area to a COBOL pgm. I want to convert it to a dfsort but I dont find a mechanism of using that parm value DATE as a variable in SYSIN or INCLUDE condtiion of the DFSORT COPY utility. Any help would be greatly appreciated. |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Do you mean you have something like PARM='yyyymmdd'?
Could you specify the date in a DFSORT Symbol like this:
//SYMNAMES DD *
targdate,'yyyymmdd'
If so you could then use targdate in a DFSORT INCLUDE statement, e.g.
Code: |
INCLUDE COND=(1,8,CH,EQ,targdate)
|
Will that work for you? If not, give more details. |
|
Back to top |
|
|
Singaram
New User
Joined: 19 Aug 2009 Posts: 19 Location: India
|
|
|
|
The original code is like this
//step10 exec pgm=cobolpgm,parm=&datevar
where datevar is in DDMMYYYY format.
Now can this "datevar" be used in the dfsort directly as you have illustrated
//SYMNAMES DD *
targdate,datevar
There is now one more issue the input file has date format as YYMMDD. Can the format be changed. As a performance improvement I have suggested a intermediate step with a REXX script to edit the sort card and the following step will execute the DFSORT. But want to know if it can be achieved in the same step itself. |
|
Back to top |
|
|
Singaram
New User
Joined: 19 Aug 2009 Posts: 19 Location: India
|
|
|
|
SORT FIELDS=COPY
INCLUDE COND=(17,6,BI,EQ,X'F0F9F0F8F2F0')
END
Currently I have to do this binary conversion as well!! I want to remove this hard coded value with parm area variable &datevar and please note that parm area variable is in DDMMYYYY format and file requires YYMMDD format. |
|
Back to top |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi,
how is the date in the parm resolved, where is the value stored ?
Gerry |
|
Back to top |
|
|
Singaram
New User
Joined: 19 Aug 2009 Posts: 19 Location: India
|
|
|
|
well the value currently carries the business date and modified by tws scheduler in this job daily. so this step takes it as a parmvalue from the jcl.
Regd date resolution a cobol pgm takes care currently.
See the question is simple as I have date stored in a variable and I want to use that variable directly in dfsort. |
|
Back to top |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi,
I know nothing about TWS scheduler, but most scheduling products that I have worked with allow you to override values at submission time, including dates.
I would discuss this with your schedulers and I'm sure they will be able to resolve your issue.
It seems fairly straight forward.
Gerry |
|
Back to top |
|
|
Skolusu
Senior Member
Joined: 07 Dec 2007 Posts: 2205 Location: San Jose
|
|
Back to top |
|
|
Singaram
New User
Joined: 19 Aug 2009 Posts: 19 Location: India
|
|
|
|
thanks a lot...
But using REXX was my final option as indicated in my reply Posted: Sun Aug 23, 2009 11:01 am ..
Just was curious is there any other way |
|
Back to top |
|
|
|