Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

DFSORT COPY with DATE as input from jcl

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: DFSORT COPY with DATE as input from jcl
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 Moderator


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

PostPosted: Sun Aug 23, 2009 1:07 am    Post subject:
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    Post subject:
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    Post subject:
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: 1703
Location: Australia

PostPosted: Sun Aug 23, 2009 2:59 pm    Post subject:
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    Post subject:
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: 1703
Location: Australia

PostPosted: Mon Aug 24, 2009 4:38 am    Post subject:
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    Post subject:
Reply with quote

singaram,

My solutions in this post will meet your requirements

http://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    Post subject: Reply to: DFSORT COPY with DATE as input from jcl
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    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Date and time format in CICS Chandru3183 CICS 2 Sat Mar 18, 2017 12:46 pm
No new posts How to get current date -1 and curren... murali.andaluri DFSORT/ICETOOL 3 Wed Mar 08, 2017 2:09 pm
No new posts DFSORT MUL FIELDS tspr52 DFSORT/ICETOOL 16 Fri Mar 03, 2017 11:53 pm
No new posts Overlay the system date Danielle.Filteau SYNCSORT 4 Fri Mar 03, 2017 1:16 am
No new posts Formating the Input file sreekusr DFSORT/ICETOOL 3 Fri Feb 17, 2017 10:40 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us