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

Connect Direct Query For Date


IBM Mainframe Forums -> All Other Mainframe Topics
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
abhijit.nayak01

Active User


Joined: 22 Mar 2009
Posts: 161
Location: South Africa

PostPosted: Mon Jan 07, 2013 1:39 pm
Reply with quote

Hi,

Please see the below connect direct cards which I am using. But I got
a requirement to automate it. The requirement is to pull the file
which is created before 2 days. i.e if today is 2013-01-07 then i need to
pull 2013-01-05 file also the date format is CCYY-MM-DD i.e. hypen is used
in between the dates. SUBDATE1 doesn't allows hypen.



Code:
SIGNON USERID=(XXXX,XXXX)                             -
         CASE=YES                                     -
         ESF=YES                                       
  SUBMIT PROC=COPY2YYY  SNODE=DEVELOP                 -
         MAXDELAY=QUEUED                              -
         NEWNAME=CPY2DEV1                             -
         PLEXCLASS=(RC12,RC12)                        -
         &DIRA=RELC  &DIRB=usr     &DIRC=aci          -
         &DIRD=abcde &DIRE=v1234    &DIRF=unix12      -
         &DIRG=logs                                   -
         &IFILE=unix.2013-01-03.log                   -
         &TODSN=TEST.UNIXLOGS.BKUP                    -
         &FRDISP=SHR                                  -
         &TODISP=SHR                                  -
         &COMP='COMPRESS EXT'                           
SIGNOFF                                                 


COPY2YYY  PROCESS                                                 
          SYMBOL &FRDSN=\'\ || / ||                   -           
          &DIRA || / || &DIRB || / || &DIRC || / ||   -           
          &DIRD || / || &DIRE || / || &DIRF || / ||   -           
          &DIRG || / || &IFILE ||                     -           
          \'\                                                     
STEP01    COPY     FROM (DSN=&FRDSN DISP=&FRDISP      -           
                   SNODE) &COMP                       -           
                   TO   (DSN=&TODSN DISP=&TODISP      -           
                   PNODE)   

Thanks,
Abhijit
Back to top
View user's profile Send private message
abhijit.nayak01

Active User


Joined: 22 Mar 2009
Posts: 161
Location: South Africa

PostPosted: Tue Jan 08, 2013 6:37 pm
Reply with quote

Hi,

By using the BPXBATCH in previos step I canfetch the file name. But now the question comes how I will put the file name from the output of BPXBATCH to the CD.

Thanks,
Abhijit.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Tue Jan 08, 2013 10:00 pm
Reply with quote

Hello,

Where is the output from BPXBATCH written now?

Where do you want it on the CD?
Back to top
View user's profile Send private message
abhijit.nayak01

Active User


Joined: 22 Mar 2009
Posts: 161
Location: South Africa

PostPosted: Thu Jan 10, 2013 3:23 am
Reply with quote

Hi,

I am able to do the CD successfully now. Wrote a shell command script which gave me output .
&IFILE=unix file name with date as per requirement
SIGNOFF
Used the above o/p in STDOUT which I made temp DSN.
Used the same &&temp DSN in next step i.e. CD step.
Fortunately it worked.
Did more analysis on UNIX side as I realised CD has limitations.

But after the above successful steps I realised I could have solved this issue by using SORT also.
Thanks,
Abhijit.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Thu Jan 10, 2013 8:33 pm
Reply with quote

Good to hear it is working - thank you for letting us know icon_smile.gif

d
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 -> All Other Mainframe Topics

 


Similar Topics
Topic Forum Replies
No new posts Replacing 'YYMMDD' with date, varying... SYNCSORT 3
No new posts Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
No new posts Connect Direct 6.3 for Z/OS All Other Mainframe Topics 20
No new posts RC query -Time column CA Products 3
No new posts Need to convert date format DFSORT/ICETOOL 20
Search our Forums:

Back to Top