View previous topic :: View next topic
|
Author |
Message |
hammie
New User
Joined: 04 Aug 2009 Posts: 3 Location: UK
|
|
|
|
Couldn't find anything that matched this so apologies if done before.
Essentially, I am writing some very simple REXX which will run a ConnectDirect which sends a file from the mainframe to a server. The problem I have is that the the ConnectDirect continuation is || so when running the ConnectDirect via REXX its translating it incorrectly.
This is the bit of REXX
Code: |
ADDRESS ISPEXEC
jobname = userid() || '1'
"FTOPEN TEMP"
"FTINCL CDJOB"
"FTCLOSE"
"VGET (ZTEMPF)"
ADDRESS TSO
x = OUTTRAP('rec.')
"SUBMIT '"ZTEMPF"'"
x = OUTTRAP('OFF')
|
Which submits something like this
Code: |
//&JOBNAME JOB (NDV,0140),'test',MSGCLASS=I,
// CLASS=K,REGION=8000K
//*******************************************************************
// EXEC CDDEV
//*******************************************************************
//SYSIN DD *
SIGNON NODE=HXNDMDVC
SUBMIT PROC=HXSND01 -
&&FROMNODE = HXNDMDVC -
&&TONODE = CD.INFRR0002 -
&&FROMDSN = TEST.MAINF.FILE.TOSEND -
&&TODSN = \'\\THISISTHE\\FILEPATH\ || -
\\\TOSENDTHEFILE\\FOLDER\ || -
\\\RECEIVED FILE.TXT' \ -
&&SYSOPTS = \SYSOPTS='\ || -
\DATATYPE(TEXT) \ || -
\STRIP.BLANKS(NO) \ || -
\XLATE(YES)'\ -
&&COMPRESS = COMPRESS -
&&CKPT = CKPT=0M
SIGNON
|
If submitted outside REXX, the above SYSOPTS (for example) would translate as
Code: |
&SYSOPTS=SYSOPTS=' DATATYPE(TEXT) STRIP.BLANKS(YES) XLATE(YES)'
|
When submitted via the REXX they come out as
Code: |
&SYSOPTS=SYSOPTS=' | DATATYPE(TEXT) | STRIP.BLANKS(NO) | XLATE(YES)'
|
Which obviously causes a syntax error in ConnectDirect. Same sort of issue the file path. I considered building them in REXX but the continuation problem remains even if I use variables (because the variable string won't fit on 1 line of 80 bytes)
I have checked and || is apparently the only continuation available in ConnectDirect
Any ideas? |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
How do you build the JCL to be submitted, instream or do you use ISPF file tailoring. |
|
Back to top |
|
|
hammie
New User
Joined: 04 Aug 2009 Posts: 3 Location: UK
|
|
|
|
The JCL is just in the ISPSLIB PDS - pretty much exactly what you see above. |
|
Back to top |
|
|
hammie
New User
Joined: 04 Aug 2009 Posts: 3 Location: UK
|
|
|
|
You spend all morning fannying, register for a forum and then go and figure it out for yourself. Typical
For anyone interested, set up the cont variable in the REXX
Code: |
ADDRESS ISPEXEC
jobname = userid() || '1'
cont = ' || - '
"FTOPEN TEMP"
"FTINCL CDJOB"
"FTCLOSE"
"VGET (ZTEMPF)"
ADDRESS TSO
x = OUTTRAP('rec.')
"SUBMIT '"ZTEMPF"'"
x = OUTTRAP('OFF')
|
Then use it in the connectdirect
Code: |
//&JOBNAME JOB (NDV,0140),'test',MSGCLASS=I,
// CLASS=K,REGION=8000K
//*******************************************************************
// EXEC CDDEV
//*******************************************************************
//SYSIN DD *
SIGNON NODE=HXNDMDVC
SUBMIT PROC=HXSND01 -
&&FROMNODE = HXNDMDVC -
&&TONODE = CD.INFRR0002 -
&&FROMDSN = TEST.MAINF.FILE.TOSEND -
&&TODSN = \'\\THISISTHE\\FILEPATH\ &CONT
\\\TOSENDTHEFILE\\FOLDER\ &CONT
\\\RECEIVED FILE.TXT' \ -
&&SYSOPTS = \SYSOPTS='\ &CONT
\DATATYPE(TEXT) \ &CONT
\STRIP.BLANKS(NO) \ &CONT
\XLATE(YES)'\ -
&&COMPRESS = COMPRESS -
&&CKPT = CKPT=0M
SIGNON
|
Not sure what the difference is, but I am not going to argue! |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Look on the bright side, at least you got a result |
|
Back to top |
|
|
|