Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Submitting a Connect Direct job via REXX

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
View previous topic :: :: View next topic  
Author Message
hammie

New User


Joined: 04 Aug 2009
Posts: 3
Location: UK

PostPosted: Wed Aug 26, 2009 4:01 pm    Post subject: Submitting a Connect Direct job via REXX
Reply with quote

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

expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Wed Aug 26, 2009 4:08 pm    Post subject:
Reply with quote

How do you build the JCL to be submitted, instream or do you use ISPF file tailoring.
Back to top
View user's profile Send private message
hammie

New User


Joined: 04 Aug 2009
Posts: 3
Location: UK

PostPosted: Wed Aug 26, 2009 4:29 pm    Post subject:
Reply with quote

The JCL is just in the ISPSLIB PDS - pretty much exactly what you see above.
Back to top
View user's profile Send private message
hammie

New User


Joined: 04 Aug 2009
Posts: 3
Location: UK

PostPosted: Wed Aug 26, 2009 4:45 pm    Post subject:
Reply with quote

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

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Wed Aug 26, 2009 4:51 pm    Post subject:
Reply with quote

Look on the bright side, at least you got a result icon_lol.gif
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 -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts How to write Rexx program to size and... sreejeshcs CLIST & REXX 14 Thu Oct 12, 2017 7:26 am
This topic is locked: you cannot edit posts or make replies. Rexx to execute spool commands upendrasri CLIST & REXX 5 Wed Oct 04, 2017 6:54 am
This topic is locked: you cannot edit posts or make replies. Rexx to execute spool commands upendrasri CLIST & REXX 47 Fri Sep 29, 2017 1:08 pm
No new posts ejck thru rexx to multiple jobs insid... Susanta All Other Mainframe Topics 5 Tue Sep 19, 2017 1:39 pm
This topic is locked: you cannot edit posts or make replies. Extract all "IF" Statements... Adarsh Damodaran CLIST & REXX 1 Wed Sep 06, 2017 9:28 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us