IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

DFSORT COPY with DATE as input from jcl


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Singaram

New User


Joined: 19 Aug 2009
Posts: 19
Location: India

PostPosted: Sat Aug 22, 2009 8:57 am
Reply with quote

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

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Sun Aug 23, 2009 1:07 am
Reply with quote

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

New User


Joined: 19 Aug 2009
Posts: 19
Location: India

PostPosted: Sun Aug 23, 2009 11:01 am
Reply with quote

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

New User


Joined: 19 Aug 2009
Posts: 19
Location: India

PostPosted: Sun Aug 23, 2009 11:07 am
Reply with quote

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

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Sun Aug 23, 2009 2:59 pm
Reply with quote

Hi,

how is the date in the parm resolved, where is the value stored ?

Gerry
Back to top
View user's profile Send private message
Singaram

New User


Joined: 19 Aug 2009
Posts: 19
Location: India

PostPosted: Mon Aug 24, 2009 12:20 am
Reply with quote

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

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Mon Aug 24, 2009 4:38 am
Reply with quote

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

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Mon Aug 24, 2009 9:26 pm
Reply with quote

singaram,

My solutions in this post will meet your requirements

www.ibmmainframes.com/viewtopic.php?t=41871&highlight=rexx
Back to top
View user's profile Send private message
Singaram

New User


Joined: 19 Aug 2009
Posts: 19
Location: India

PostPosted: Tue Aug 25, 2009 1:17 am
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts TRIM everything from input, output co... DFSORT/ICETOOL 1
No new posts Replacing 'YYMMDD' with date, varying... SYNCSORT 3
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
Search our Forums:

Back to Top