View previous topic :: View next topic |
Author |
Message |
Shankarganesh_gopal Beginner
Joined: 24 May 2005 Posts: 36 Topics: 20 Location: chennai
|
Posted: Thu Mar 29, 2007 10:45 pm Post subject: Getting Previous Month |
|
|
Hi all,
I have a JCL which l;ooks like below.
Code: |
//USSSCP EXEC PGM=AOPBATCH,PARM='sh'
//STDOUT DD SYSOUT=*
//STDERR DD SYSOUT=*
//STDENV DD *
REMOTE_SYS=dbsmwafp-dev.de.db.com
REMOTE_USER=mtnsftp
MODE=ASCII
REMOTE_FILE=./transfer/ig3956_e302&CYYYY.&PMM
LOCAL_FILE=/scp/out/ig3956_e003
IDENT_FILE=/home/OPCE800/.ssh/id_rsa
//STDIN DD *
|
Here &MM takes current Month. But we want to use Previous Month. If suppose the job run in Feb MM will be 02. But we want it to be 01. So in this case, do we need to code PMM for Previous month or what is the correct oprion. Please help me out. It's Urgent.
Thanks in advanse.
Shankar |
|
Back to top |
|
 |
Cogito-Ergo-Sum Advanced
Joined: 15 Dec 2002 Posts: 637 Topics: 43 Location: Bengaluru, INDIA
|
Posted: Fri Mar 30, 2007 5:53 am Post subject: |
|
|
Can you show us what is in STDIN ? Also, you have just the sh in PARM. You are sure, that is all you have ? _________________ ALL opinions are welcome.
Debugging tip:
When you have eliminated all which is impossible, then whatever remains, however improbable, must be the truth.
-- Sherlock Holmes. |
|
Back to top |
|
 |
Shankarganesh_gopal Beginner
Joined: 24 May 2005 Posts: 36 Topics: 20 Location: chennai
|
Posted: Fri Mar 30, 2007 6:01 am Post subject: |
|
|
That's all I have. I don't any extra information about this job and nobody is knowing much in my project.
REMOTE_FILE=./transfer/ig3956_e302&CYYYY.&PMM
The above line is the one that tells the file name. Here CYYYY is getting current year and CMM ( which i changed here as PMM) is getting current month. Also I couldn't able to get any usefull information from internet. |
|
Back to top |
|
 |
Cogito-Ergo-Sum Advanced
Joined: 15 Dec 2002 Posts: 637 Topics: 43 Location: Bengaluru, INDIA
|
Posted: Fri Mar 30, 2007 6:30 am Post subject: |
|
|
Quote: | The above line is the one that tells the file name. |
No, it does not. Because, it is instream data. So, it is not seen by JCL/MVS. You must change/replace it. That is why I wanted to know what is in the STDIN and the PARM part. There MUST be something that replaces the &CMM or &PMM etc part. _________________ ALL opinions are welcome.
Debugging tip:
When you have eliminated all which is impossible, then whatever remains, however improbable, must be the truth.
-- Sherlock Holmes. |
|
Back to top |
|
 |
Shankarganesh_gopal Beginner
Joined: 24 May 2005 Posts: 36 Topics: 20 Location: chennai
|
Posted: Fri Mar 30, 2007 7:08 am Post subject: |
|
|
I will send you the detail in a minute |
|
Back to top |
|
 |
Shankarganesh_gopal Beginner
Joined: 24 May 2005 Posts: 36 Topics: 20 Location: chennai
|
Posted: Fri Mar 30, 2007 7:18 am Post subject: |
|
|
Here is the detail
//STDIN DD *
export PARMS="-oStrictHostKeyChecking=ask"
echo "PARMS= $PARMS"
echo "user= $USER"
echo "home= $HOME"
/scp/bin/do_sftp |
|
Back to top |
|
 |
Cogito-Ergo-Sum Advanced
Joined: 15 Dec 2002 Posts: 637 Topics: 43 Location: Bengaluru, INDIA
|
Posted: Sat Mar 31, 2007 5:09 am Post subject: |
|
|
In the above line, a program do_sftp is executed, which is probably setting the value for month. You might want to have a look there. _________________ ALL opinions are welcome.
Debugging tip:
When you have eliminated all which is impossible, then whatever remains, however improbable, must be the truth.
-- Sherlock Holmes. |
|
Back to top |
|
 |
Jeeva Beginner
Joined: 18 Oct 2007 Posts: 3 Topics: 2
|
Posted: Thu Oct 25, 2007 11:23 am Post subject: |
|
|
Hi all,
Can you explain how to define STDENV and STDIN. My requriement is to do SFTP a dataset from mainframe to UNIX. _________________ Jeeva |
|
Back to top |
|
 |
Nic Clouston Advanced
Joined: 01 Feb 2007 Posts: 1075 Topics: 7 Location: At Home
|
Posted: Thu Oct 25, 2007 2:04 pm Post subject: |
|
|
Jeeva
First you look at your manuals, then, when you do not understand what they say, you search the internet and the forums, then, assuming you still do not understand, you start a NEW topic. _________________ Utility and Program control cards are NOT, repeat NOT, JCL. |
|
Back to top |
|
 |
Terry_Heinze Supermod
Joined: 31 May 2004 Posts: 391 Topics: 4 Location: Richfield, MN, USA
|
Posted: Thu Oct 25, 2007 8:24 pm Post subject: |
|
|
Since STDENV and STDIN are DDs in your JCL, it is probable that they refer to files defined in program AOPBATCH which only your shop knows about. You'll have to look at the source code of AOPBATCH to see how these two files are used. _________________ ....Terry |
|
Back to top |
|
 |
|
|