- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- FTP syntax to IBM Mainframe
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-18-2009 07:29 PM
тАО08-18-2009 07:29 PM
Does anyone have the proper DCL syntax to put a file to IBM mainframe system. The destination is a mainframe dataset gdg. I'm told I need to wrap the name in single quotes,
example:
$ FTP/INPUT=FTPSCRIPT.TXT IBM1.MYCOMPANY.COM
where FTPSCRIPT.TXT IS
MyUsername
MyPassword
put TEST.DAT "'ABC.123.XYZ(+1)'"
bye
Now the problem: I need to represent the dataset name inside quotes for a quoted string as P1 parameter for my ftp procedure.
Example:
$ VMSFILE="TESTDIR:CLI_TEST_ELIG.DAT"
$ FTPFILE="'TLVPC.OPDCD.TCOB.CB30073.ELIG(+1)'"
$ @FTPFILE "SHOWSCRIPT, FTPID=MAINFRAM, VMSFILE=''VMSFILE', FTPFILE=''FTPFILE'"
I need to get double quotes around the data set name. Script is produced with only the single quotes of course.
BRNTWD
BRNTW00D
asc
put TESTDIR:CLI_TEST_ELIG.DAT 'TLVPC.OPDCD.TCOB.CB30073.ELIG(+1)'
exit
I can't get the right combination of " around the name.
Thanks for suggestions,
John
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-18-2009 07:54 PM
тАО08-18-2009 07:54 PM
Re: FTP syntax to IBM Mainframe
alp $ type sp1.com
$ write sys$output p1
$ write sys$output "''p1'"
alp $ @ sp1.com fred
FRED
FRED
alp $ @ sp1.com "fred"
fred
fred
alp $ @ sp1.com ""fred""
FRED
FRED
alp $ @ sp1.com """fred"""
"fred"
FRED
alp $ @ sp1.com """"fred""""
"FRED"
FRED
alp $ @ sp1.com """""fred"""""
""fred""
"fred"
alp $ @ sp1.com """"""fred""""""
""FRED""
"FRED"
alp $ @ sp1.com """""""fred"""""""
"""fred"""
"FRED"
alp $ @ sp1.com """"""""fred""""""""
"""FRED"""
"FRED"
alp $ @ sp1.com """""""""fred"""""""""
""""fred""""
""fred""
[...]
Stop when you see what you want.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-18-2009 08:15 PM
тАО08-18-2009 08:15 PM
Re: FTP syntax to IBM Mainframe
Not sure I managed to follow the problem description exactly.
Anyway... Typically one just keeps adding double-double quotes within a quoted string until your get the desired. Every time the symbol is substitute, a set will turn to single.
So if your downstream proceduces insist to assigning variables through substitution, then you may well need 4 or 8 double quotes in a row.
You may want to review the procedures used to change to use string concatenation instead of substitution.
So instead of
$ a = """aap"""
$ b = """noot"""
$ c = "''a' ''b'"
$ show symb c
C = "AAP NOOT"
or even
$ aa = """""aap"""""
$ bb = """""noot"""""
$ cc = "''aa' ''bb'"
CC = ""aap" "noot""
use:
$ x = a + " " + b
$ show symb x
X = ""aap" "noot""
$ write sys$output x
"aap" "noot"
That typically helps me keep my sanity.
That and helper symbols like
$ q = "'"
$ qq = """"
Sometimes it helps to used the 'delayed' substitution operator &. I
$ y = &a + " " + &b
$ show symb y
Y = "aap noot"
fwiw,
Hein.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-18-2009 08:36 PM
тАО08-18-2009 08:36 PM
SolutionNote that you can parameterise FTP scripts using PIPE:
$ srcfile="TESTDIR:CLI_TEST_ELIG.DAT"
$ dstfile="'TLVPC.OPDCD.TCOB.CB30073.ELIG(+1)'"
$ OUT="WRITE SYS$OUTPUT"
$ PIPE (OUT "ASCII" ; -
OUT "PUT ''srcfile' ''dstfile'" ; -
OUT "BYE") | -
FTP/INPUT=SYS$PIPE/USER="''User'"/PASSWORD="''Pass'" 'node'
If you want to specify the dataset name without quotes and have the script add them, try:
$ srcfile="TESTDIR:CLI_TEST_ELIG.DAT"
$ dstfile="TLVPC.OPDCD.TCOB.CB30073.ELIG(+1)"
$ OUT="WRITE SYS$OUTPUT"
$ PIPE (OUT "ASCII" ; -
OUT "PUT ''srcfile' '"+dstfile+"'" ; -
OUT "BYE") | -
FTP/INPUT=SYS$PIPE/USER="''User'"/PASSWORD="''Pass'" 'node'
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-19-2009 04:52 AM
тАО08-19-2009 04:52 AM
Re: FTP syntax to IBM Mainframe
http://labs.hoffmanlabs.com/node/136
Quote the target file spec, and you can stick most anything into it that you want; that the remote end requires.
COPY/FTP [/BINARY or /ASCII] -
foo.txt -
ibm1.example.com"user pass"::"what-+=ever ?? you !! want"
The remote spec is passed to the far end for processing.
If you need double quotes IN that remote string, then double those within the quoted string.
COPY/FTP [/BINARY or /ASCII] -
foo.txt -
ibm1.example.com"user pass"::"He said ""hello"" to me"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-19-2009 05:03 AM
тАО08-19-2009 05:03 AM
Re: FTP syntax to IBM Mainframe
Thanks,
John F.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-08-2009 01:46 PM
тАО09-08-2009 01:46 PM
Re: FTP syntax to IBM Mainframe
Thanks,
John