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
 

 

Connect Direct Query For Date

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

Active User


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

PostPosted: Mon Jan 07, 2013 1:39 pm    Post subject: Connect Direct Query For Date
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: 157
Location: South Africa

PostPosted: Tue Jan 08, 2013 6:37 pm    Post subject:
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

Site Director


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

PostPosted: Tue Jan 08, 2013 10:00 pm    Post subject:
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: 157
Location: South Africa

PostPosted: Thu Jan 10, 2013 3:23 am    Post subject: Reply to: Connect Direct Query For Date
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

Site Director


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

PostPosted: Thu Jan 10, 2013 8:33 pm    Post subject: Reply to: Connect Direct Query For Date
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    IBMMAINFRAMES.com Support Forums -> All Other Mainframe Topics 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 JCL to Set Return code based on DB2 S... vinu78 DB2 17 Mon Mar 13, 2017 9:47 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 Overlay the system date Danielle.Filteau SYNCSORT 4 Fri Mar 03, 2017 1:16 am
No new posts SQL query not working in Cobol program. CuriousMainframer COBOL Programming 14 Wed Feb 22, 2017 5:56 pm


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