View previous topic :: View next topic
|
Author |
Message |
raju.mopidevi
New User
Joined: 18 Sep 2011 Posts: 12 Location: India
|
|
|
|
I am submitting like this
Code: |
SIGNON CASE=YESS USERID=<myID,pwd>
SUBMIT PROC=GETTXTFL -
SNODE=unixservername -
&PDSN=mainframe file -
&SDSN='/storage/report.txt' -
SIGNOFF
|
GETTXTFL PROC code is as follows
Code: |
GETTXTFL PROCESS -
STEP01 COPY -
FROM(SNODE -
DSN=&SDSN -
DISP=SHR -
)COMPRESS EXT -
TO(PNODE -
DSN=&PDSN -
SYSOPTS=":DATATYPE=TEXT:XLATE=NO:STRIP.BLANKS=NO" -
DCBINOF='DCB=(DSORG=PS, RECFM=U)' -
DISP=RPL,CATLG,DELETE)
EXIT
|
I am getting this error,
Code: |
LONG TEXT => When using the SUBmit command OUTSIDE the process the keyword 'PROC'
or 'DSN' must be specified. Other valid optional command
keywords:'HOLD', 'NEWNAME', 'PNODE', 'PRTY', 'RETAIN',
'SNODE', 'CLASS', 'STARTT', and symbolic parameter values
(designated by '&' as a prefix) are valid.
SYSTEM ACTION: Return to invoker with RC=8
RESPONSE: Reenter your SUBmit command using only the keywords listed above. check PROCess statement keyword.
|
Can you tell where I am using wrong keywords ?
Thanks,
Raju |
|
Back to top |
|
|
Marso
REXX Moderator
Joined: 13 Mar 2006 Posts: 1353 Location: Israel
|
|
|
|
raju.mopidevi wrote: |
Code: |
SIGNON CASE=YESS USERID=<myID,pwd>
SUBMIT PROC=GETTXTFL -
SNODE=unixservername -
&PDSN=mainframe file -
&SDSN='/storage/report.txt' -
SIGNOFF
|
Can you tell where I am using wrong keywords ? |
Did you cut-and-paste that text ?
There are 2 errors:
1. YESS should be YES
2. the line with "&SDSN" should not have a continuation character (the minus at the end). |
|
Back to top |
|
|
raju.mopidevi
New User
Joined: 18 Sep 2011 Posts: 12 Location: India
|
|
|
|
Thanks for the immediate reply,
Actually those two are typo. I didn't cut pasted.
1. CASE=YES
2. I didn't put continuation character after &SDSN in my original file
--- |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2455 Location: Hampshire, UK
|
|
|
|
Well, when you get your ACTUAL text here we may be able to look at it. |
|
Back to top |
|
|
raju.mopidevi
New User
Joined: 18 Sep 2011 Posts: 12 Location: India
|
|
|
|
Nic,
My Actual program calls DMBATCH uses SUBMIT proc which internally calls GETTXTFL PROC
Code: |
ADDRESS ISREDIT "MACRO"
Address TSO
"Allocate DDN(TSOLIB) SHR REUSE DSN(' my tso lib pds ')"
"Allocate DDN(DMNETMAP) SHR REUSE DSN(' my netmap ')"
"Allocate DDN(DMMSGFIL) SHR REUSE DSN(' my msgfil lib ')"
"Allocate DDN(DMPUBLIB) SHR REUSE DSN(' my DMPUBLIB ')"
"Allocate DDN(SYSIN) SHR REUSE DSN(' PS file with SUbmit Proc ')"
"Allocate DDN(DMPRINT) SHR REUSE DSN(' output report file ')"
Address ISPEXEC "SELECT PGM(DMBATCH) PARM('YYLLYNN')"
if rc=0 then
say "your file transferred"
"FREE FI(DMNETMAP DMPRINT TSOLIB )"
"FREE FI(DMMSGFIL DMPUBLIB SYSIN DMPRINT)"
EXIT
|
Submit PROC
Code: |
SIGNON CASE=YES USERID=<myID,pwd>
SUBMIT PROC=GETTXTFL -
SNODE=unixservername -
&PDSN=mainframe file -
&SDSN='/storage/report.txt'
SIGNOFF
|
GETTXTFL proc
Code: |
GETTXTFL PROCESS -
STEP01 COPY -
FROM(SNODE -
DSN=&SDSN -
DISP=SHR -
)COMPRESS EXT -
TO(PNODE -
DSN=&PDSN -
SYSOPTS=":DATATYPE=TEXT:XLATE=NO:STRIP.BLANKS=NO" -
DCBINOF='DCB=(DSORG=PS, RECFM=U)' -
DISP=RPL,CATLG,DELETE)
EXIT |
|
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2455 Location: Hampshire, UK
|
|
|
|
I see that it is an ISPF edit macro that kicks all this off. Is the file being transferred the one being edited? Has this exact process been used before or is this the first time and you are debugging it? |
|
Back to top |
|
|
raju.mopidevi
New User
Joined: 18 Sep 2011 Posts: 12 Location: India
|
|
|
|
Nic,
This is program logic but not the file being transferred.
I want to get this file '/storage/report.txt' from UNIX to the mainframe.
BTW, this program works when I copy mainframe file to UNIX. I am facing RC=8 when I tried to copy a file from UNIX to mainframe.
I think, I made a mistake in the PROC GETTXTFL. But unable to find out ! |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
when i used the interactive c:d
i could either
sign-on to a tso session of the source node
and push the file to the destination
or sign-on to a tso session of the destination node
and pull the file to the destination.
soooooo,
you said:
you can send the file from mf to unix
why don't you receive the file on the mf from the unix?
thereby triggering a 'new' file on mf to start a task |
|
Back to top |
|
|
raju.mopidevi
New User
Joined: 18 Sep 2011 Posts: 12 Location: India
|
|
|
|
dbzTHEdinosauer wrote: |
when i used the interactive c:d
i could either
sign-on to a tso session of the source node
and push the file to the destination
or sign-on to a tso session of the destination node
and pull the file to the destination.
|
You are correct mate.
I am able to push the file from mainframe to UNIX.
but I am not able to pull the file from UNIX to mainframe.
As UNIX is creating the file without asking the file attributes, I am able to push the file. But I have to provide DCB info while creating the file in mainframe( Am I wrong here ? is it necessary to give DCB info?). I have tried several time by modifying the DCB info in SUBMIT proc. But I am unable to pull the file from UNIX. |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
i found with c:d,
anytime i transferred a file from one op-sys to another,
it was just easier to
create (via mod in a iefbr14) the file
then overwrite with the c:d
and did not bother cluttering up my control cards with dcb garbage
it was easier to control the dcb parms on the iefbr14 step.
but thats me. |
|
Back to top |
|
|
raju.mopidevi
New User
Joined: 18 Sep 2011 Posts: 12 Location: India
|
|
|
|
Are you recommend me to use IEFBR14 utility in SUBMIT PROC ? Can you explain me in detail?
Can you share me any ebooks which include C : D with IEFBR14 |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
explanation of iefbr14
in the iefbr14 step, have a dd for your 'destination file'
which will be overwritten (replaced) by the d:c step.
i always use DISP=(MOD,CATLG,DELETE)
and
the appropriate dcb parms.
then when the d:c step runs,
the file is cateloged and can be found by the d:c task. |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
you do realize a successful outcome of your batch c:d step
means
that all you have done
is hang a request on the input queue
for the c:d started task
that actually performs the transfer,
which
depending on the load of your system in general
and c:d stated task in particular,
(and who is tasked with support)
can be seemingly simultaneous with the end of your batch job
or hoooouurrrrsss later. |
|
Back to top |
|
|
raju.mopidevi
New User
Joined: 18 Sep 2011 Posts: 12 Location: India
|
|
|
|
I found two mistakes in the GETTXTFL.
I misplaced the keyword "EXIT" in column 1. I didn't added "HOLD=NO".
Now I corrected both mistakes
1. EXIT keyword moved to column 3
2. HOLD=NO added as a row 2 in GETTXTFL
So now the RC=0. But file did not copied to the mainframe.
I have checked NDMCMDS log, no error message. It says "successful".
Do we need to allocate the file manually by ALLOCATE command OR will it be allocated by C : D during copying process? |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2455 Location: Hampshire, UK
|
|
|
|
Have you checked the CDLOG of the started task? You have only checked your batch job - the actual transfer, as you have already been told, is done by the started task (possibly called NDM) and may occur somewhat later than the end of your job. Your job only asks NDM to do the transfer - it does not wait for the transfer to be done. The log for the actual transfer is recorded in CDLOG of the NDM started task. |
|
Back to top |
|
|
raju.mopidevi
New User
Joined: 18 Sep 2011 Posts: 12 Location: India
|
|
|
|
Nic,
Yes, I have added this code & verified NDM log too
Code: |
"Allocate DDN(NDMCMDS) SHR REUSE DSN('*')" |
This log is combined log of NDM & CD. I have used "TRACE R" in my REXX CODE.
Code: |
SELECT PGM(DMBATCH) PARM('YYLLYNN')"
SCANNING FOR CASE KEYWORD
LENGHT OF STRING : 31
STRING BEING SCANNED SIGNON CASE=YES USERID=<my id>
SIGNON COMMAND FOUND
CASE KEYWORD FOUND
CASE =YES OVERRIDE IN AFFECT
COMMAND DOES NOT SAY FOLD
CD/API VER RLSE MOD=40,800 PUT LEVEL=4802
SIGNON GLOBAL CASE=YES
API NETMAP = < our mainfram net map library location >
REETTING ASE FLAGS
GLOBAL CASE=YES IN AFFECT
SCANNING OFR CASE KEYWORD
LENGHT OF STRING : 102
STRING BEING SCANNED
SUMIT PROC=GETTXTFL SNODE=<unix server name> &pdsn=<destination filename> &SDSN='/storage/report.txt'
***** GLOBAL CASE=YES ******
DEFAULT CASE DIRECTION IS MIXED (CASE=YES)
SCANNING FOR CASE KEYWORD
LENGTH OF STRING: 184
STRING BEING SCANNED
STEP01 COPY FROM(SNODE DSN='/storage/report.txt' ) to (PNODE DSN=<destination mainframe ps file location SYSOPTS=":DATATYPE=TEXT:XLATE=NO:STRIP.BLANKS=NO" DCB=(DSORG=PS,RECFM=U) DISP=(RPL,CATLG,DELETE) )
****** GLOBAL CASE=YES ******
DEFAULT CASE DIRECTION IS MIXED (CASE=YES)
DMCBCOPY D1DDSN SET BLKSIZE=2C0A
6AD9
4444 4444 44
0000 0000 00
DMCBCOPY D1NCP=...D1FLAG7=00
RESETTING CASE FLAGS
GLOBAL CASE=YES IN AFFECT
SCANNING FOR CASE KEYWORD
LENGHT OF STRING 6
STRING BEING SCANNED EXIT
***** GLOBAL CASE = YES ****
DEFAULT CASE DIRECTION IS MIXED (CASE=YES)
RESETTING CASE FLAGS
GLOBAL CASE=YES IN AFFECT
SCANNING FOR CASE KEYWORD
LENGTH OF STRING 6
STRING BEING SCANNED : PEND
***** GLOBAL CASE = YES ****
DEFAULT CASE DIRECTION IS MIXED (CASE=YES)
RESETTING CASE FLAGS
GLOBAL CASE=YES IN AFFECT
SCANNING FOR CASE KEYWORD
LENGTH OF STRING 9
STRING BEING SCANNED : SIGNOFF
***** GLOBAL CASE = YES ****
DEFAULT CASE DIRECTION IS MIXED (CASE=YES)
API NETMAP = < mainframe netmap lib location >
GLOBAL CASE=YES IN AFFECT
IF RC=0
"1"
THEN
SAY "YOUR FILES(S) IS/ARE TRANSFERRED SUCCESSFULLY !!"
YOUR FILES(S) IS/ARE TRANSFERRED SUCCESSFULLY !!
|
|
|
Back to top |
|
|
Pete Wilson
Active Member
Joined: 31 Dec 2009 Posts: 580 Location: London
|
|
|
|
If it says RC=0 then it must have created something on the mainframe. It's not as simple as the target mainframe file inheriting your TSO DI prefix as the HLQ is it? |
|
Back to top |
|
|
|