MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Getting Previous Month

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL)
View previous topic :: View next topic  
Author Message
Shankarganesh_gopal
Beginner


Joined: 24 May 2005
Posts: 36
Topics: 20
Location: chennai

PostPosted: Thu Mar 29, 2007 10:45 pm    Post subject: Getting Previous Month Reply with quote

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
View user's profile Send private message
Cogito-Ergo-Sum
Advanced


Joined: 15 Dec 2002
Posts: 637
Topics: 43
Location: Bengaluru, INDIA

PostPosted: Fri Mar 30, 2007 5:53 am    Post subject: Reply with quote

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


Joined: 24 May 2005
Posts: 36
Topics: 20
Location: chennai

PostPosted: Fri Mar 30, 2007 6:01 am    Post subject: Reply with quote

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
View user's profile Send private message
Cogito-Ergo-Sum
Advanced


Joined: 15 Dec 2002
Posts: 637
Topics: 43
Location: Bengaluru, INDIA

PostPosted: Fri Mar 30, 2007 6:30 am    Post subject: Reply with quote

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


Joined: 24 May 2005
Posts: 36
Topics: 20
Location: chennai

PostPosted: Fri Mar 30, 2007 7:08 am    Post subject: Reply with quote

I will send you the detail in a minute
Back to top
View user's profile Send private message
Shankarganesh_gopal
Beginner


Joined: 24 May 2005
Posts: 36
Topics: 20
Location: chennai

PostPosted: Fri Mar 30, 2007 7:18 am    Post subject: Reply with quote

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
View user's profile Send private message
Cogito-Ergo-Sum
Advanced


Joined: 15 Dec 2002
Posts: 637
Topics: 43
Location: Bengaluru, INDIA

PostPosted: Sat Mar 31, 2007 5:09 am    Post subject: Reply with quote

Code:
/scp/bin/do_sftp


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


Joined: 18 Oct 2007
Posts: 3
Topics: 2

PostPosted: Thu Oct 25, 2007 11:23 am    Post subject: Reply with quote

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
View user's profile Send private message AIM Address Yahoo Messenger
Nic Clouston
Advanced


Joined: 01 Feb 2007
Posts: 1075
Topics: 7
Location: At Home

PostPosted: Thu Oct 25, 2007 2:04 pm    Post subject: Reply with quote

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


Joined: 31 May 2004
Posts: 391
Topics: 4
Location: Richfield, MN, USA

PostPosted: Thu Oct 25, 2007 8:24 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL) All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group