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
 

 

passing a parameter in STDENV which is going beyond a single

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
PKONDURI

New User


Joined: 17 Mar 2009
Posts: 11
Location: PUNE,India

PostPosted: Tue Mar 17, 2009 8:15 pm    Post subject: passing a parameter in STDENV which is going beyond a single
Reply with quote

1)I am using BPXBATCH utility to pass variables to a script file.....
Basically i need to pass a value which is going beyond a single line to the variable i am using in the script ...how do i do it?

Example Code:
//TEST EXEC PGM=BPXBATCH,
// PARM='SH /dir1/file1.sh'
//SYSPRINT DD SYSOUT=*
//STDOUT DD PATH='/dir1/file.out',
// PATHOPTS=(OWRONLY,OCREAT,OTRUNC),PATHMODE=SIRWXU
//STDERR DD PATH='/dir1/errlog',
// PATHOPTS=(OWRONLY,OCREAT,OTRUNC),PATHMODE=SIRWXU
//STDENV DD *
STORAGE_VALUE=VOLSER(variable1,variable2,variable2,variable3,variable4-
variable5,variable6,variable7,variable8)
/*
//


2)Again i am using BPXBATCH utility to copy a unix file from one location to another location..
the target location is so big that it is going beyond a single line...how do i do this

Example code:
//CPYRESPA EXEC PGM=BPXBATCH,COND=(4000,LT)
//STDERR DD PATH='/dir1/error'
// PATHOPTS=(OWRONLY,OCREAT),PATHMODE=SIRWXU
//STDPARM DD *
SH cp
/dir1/dir2/dir3/dir4/dir5/dir6/dir7/dir8/dir9/dir10/sourcefile > /dir1/dir2/dir3/dir4/dir5/dir6/dir7/dir8/dir9/dir10/targetfile
/*

I tried giving '\' at the end of first line and > in the second line it is not working...i have tried many methods but not working...

Kindly help me out with this
Back to top
View user's profile Send private message

Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8117
Location: East Dubuque, Illinois, USA

PostPosted: Tue Mar 17, 2009 8:31 pm    Post subject:
Reply with quote

1) Create a Unix file that contains the parameter value you want and point the PATH to that Unix file instead of DD *.
2) Try using a trailing +:
Code:
SH cp +
/dir1/dir2/dir3/dir4/dir5/dir6/dir7/dir8/dir9/dir10/sourcefile +
> /dir1/dir2/dir3/dir4/dir5/dir6/dir7/dir8/dir9/dir10/targetfile
Back to top
View user's profile Send private message
PKONDURI

New User


Joined: 17 Mar 2009
Posts: 11
Location: PUNE,India

PostPosted: Wed Mar 18, 2009 8:31 pm    Post subject:
Reply with quote

1)Could you please explain a bit on the solition you suggested for my first query,
What i understood in i should create aunix file and pass it to the variable?
Code:
STORAGE_VALUE=/varfile

if this is true then will the path will be resolved to data contained in it when it is passed to the script?

2)i tried appending + as you suggested ,but it did not work!
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8117
Location: East Dubuque, Illinois, USA

PostPosted: Wed Mar 18, 2009 9:21 pm    Post subject:
Reply with quote

Upon further review, the trailing + didn't work but the trailing backslash did (as long as there's no space between the last character and the backslash).

For #2, I ran this JCL
Code:
//BPXBATCH EXEC PGM=BPXBATCH,
//         PARM='sh',
//         REGION=0M
//SYSPRINT DD SYSOUT=*
//STDOUT DD PATH='/u/tech/ttssrs0/bpxbatch.031809.stdout',
// PATHOPTS=(OWRONLY,OCREAT),PATHMODE=SIRWXU
//STDERR DD PATH='/u/tech/ttssrs0/bpxbatch.031809.stderr',
// PATHOPTS=(OWRONLY,OCREAT),PATHMODE=SIRWXU
//STDIN   DD PATH='/u/tech/ttssrs0/bpxbatch.031809.stdin'
with this input in STDIN:
Code:
touch /u/tech/ttssrs0/bpxbatch.031809.output
cp /u/tech/ttssrs0/bpxtest.090317.out\
   /u/tech/ttssrs0/bpxbatch.031809.output
and the copy worked fine.

As far as #1 goes, this JCL:
Code:
//BPXBATCH EXEC PGM=BPXBATCH,
//         PARM='sh',
//         REGION=0M
//SYSPRINT DD SYSOUT=*
//STDOUT DD PATH='/u/tech/ttssrs0/bpxbatch.031809.stdout',
// PATHOPTS=(OWRONLY,OCREAT),PATHMODE=SIRWXU
//STDERR DD PATH='/u/tech/ttssrs0/bpxbatch.031809.stderr',
// PATHOPTS=(OWRONLY,OCREAT),PATHMODE=SIRWXU
//STDIN   DD PATH='/u/tech/ttssrs0/bpxbatch.031809.stdin'
//STDENV  DD PATH='/u/tech/ttssrs0/bpxbatch.031809.longparm'
with STDEJNV file value of
Code:
STORAGE_VALUE=VOLSER(variable1,variable2,variable2,variable3,variable4,variable5,variable6,variable7,variable8)
and an env command in STDIN produced output of
Code:
STORAGE_VALUE=VOLSER(variable1,variable2,variable2,variable3,variable4,variable5,variable6,variable7,variable8)
MAIL=/usr/mail/TTSSRS0
PATH=/bin:/usr/sbin/:/usr/lpp/perl/bin/:/usr/local/bin/:/usr/lpp/internet/sbin/:
TMPDIR=/u/tech/ttssrs0/tmp
EDITOR=ed
_BPXK_AUTOCVT=ON
SHELL=/bin/sh
PS1=$LOGNAME:$PWD: >
_CEE_RUNOPTS=XPLINK(ON)
_=/bin/env
LOGNAME=TTSSRS0
LANG=C
LIBPATH=/lib:/usr/lib:.:/usr/lpp/perl/lib/5.8.7/os390-thread-multi/CORE:/usr/loc
HOME=/u/tech/ttssrs0
TZ=EST5EDT
MANPATH=/usr/man/%L:/usr/lpp/perl/man/C
NLSPATH=/usr/lib/nls/msg/%L/%N:/usr/lib/nls/msg/%L/%N.cat:/usr/lpp/gskssl/lib/nl
(not all the data is listed -- just enough to show what is going on).
Back to top
View user's profile Send private message
PKONDURI

New User


Joined: 17 Mar 2009
Posts: 11
Location: PUNE,India

PostPosted: Thu Mar 19, 2009 2:54 pm    Post subject:
Reply with quote

Thanks a tonne Robert,
I have made changes as you suggested..It worked..two of issues i was facing are solved!
I would also want to mention that i am quite amazed to see your turn arround time...
Great work!
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8117
Location: East Dubuque, Illinois, USA

PostPosted: Thu Mar 19, 2009 5:21 pm    Post subject:
Reply with quote

Glad to hear you got both issues resolved. You got lucky that I happened to be able to look quickly at your issues!
Back to top
View user's profile Send private message
PKONDURI

New User


Joined: 17 Mar 2009
Posts: 11
Location: PUNE,India

PostPosted: Thu Mar 19, 2009 5:32 pm    Post subject:
Reply with quote

Hi,
In the above solution we are passing SYSIN data as a unix file ,
Can i create contents of the unix file using batch processing using any utility?
I tried
Code:
echo "xyz\" >> /targetunixfile

I am not able to append "\" at the end!
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8117
Location: East Dubuque, Illinois, USA

PostPosted: Thu Mar 19, 2009 5:37 pm    Post subject:
Reply with quote

Put your command in a normal MVS file. You can then use OPUT to move it to a Unix file:
Code:
//OPUT     EXEC PGM=IKJEFT01,DYNAMNBR=400,REGION=0M
//SYSPRINT DD   SYSOUT=*
//SYSTSPRT DD   SYSOUT=*
//SYSTSIN  DD   *
  OPUT 'PGMR.RS0.JAVA.DAT' -
       '/u/tech/ttssrs0/dat'
moves PGMR.RS0.JAVA.DAT to /u/tech/ttssrs0/dat in Unix.
Back to top
View user's profile Send private message
PKONDURI

New User


Joined: 17 Mar 2009
Posts: 11
Location: PUNE,India

PostPosted: Fri Mar 20, 2009 7:47 pm    Post subject:
Reply with quote

Thanks robert!
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 -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts JTS parameter Shashank Chaubey JCL & VSAM 2 Thu Jul 13, 2017 4:15 pm
No new posts Include/omit with "ALL" pa... mgl DFSORT/ICETOOL 6 Wed Jun 14, 2017 2:31 pm
This topic is locked: you cannot edit posts or make replies. SDSF multiple spool datasets extracte... PJAlarcon CLIST & REXX 1 Fri Apr 21, 2017 10:50 pm
No new posts Data replication from multiple Db2 ta... kishpra DB2 9 Mon Mar 27, 2017 9:58 pm
No new posts Splitting of single report to seperat... abdulrafi TSO/ISPF 7 Mon Mar 27, 2017 3:59 pm


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