View previous topic :: View next topic
|
Author |
Message |
swapnilushinde
New User
Joined: 17 Mar 2009 Posts: 30 Location: Bangalore.India
|
|
|
|
Hi
I want to change a control card in runtime . I want to change the filename(present in SYSIN card) when the same job runs twice in a day or particular time span. I wanted to know whether changing the control card like this is possible or not and if yes then how can I do it? |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
What program / utility is being processed
What are you using this program utility to do
What changes do you want to make
Psychic day was yesterday so please post an example of what you have and what you want to change it to. |
|
Back to top |
|
|
swapnilushinde
New User
Joined: 17 Mar 2009 Posts: 30 Location: Bangalore.India
|
|
|
|
HI
I am using SYSIN card for FTP step. I wanted to avoid overwriting of file mentioned in SYSIN after each run. For that I want to change that filename in every next run. The SYSIN for FTP step :
Code: |
FTP.abcd.COM
cd cds1
PUT 'MAINFRAME FILE' FILENAME1.txt
CLOSE
QUIT
|
Here I want to change the name FILENAME1 for next run without manually changing it... |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
Quote: |
Here I want to change the name FILENAME1 for next run without manually changing it |
Okay ... good luck with that. |
|
Back to top |
|
|
swapnilushinde
New User
Joined: 17 Mar 2009 Posts: 30 Location: Bangalore.India
|
|
|
|
I know this is impossible but just wanted to double check with others... |
|
Back to top |
|
|
Douglas Wilder
Active User
Joined: 28 Nov 2006 Posts: 305 Location: Deerfield IL
|
|
|
|
You could over-write the dataset containing the FTP Control Cards or use and include in your JCL and over-write the contents of the include. For either of these you may/would need to write back the old contents the next day. Just thinking outside the box. |
|
Back to top |
|
|
dominickim
New User
Joined: 28 Feb 2007 Posts: 65 Location: NS, CA
|
|
|
|
Hello Swapnil,
If you know the rule for the FILENAMEs and allowed to change the JCL, why don't you put the new COBOL (or whatever easy for you) step that creates/changes the SYSIN dataset for next FTP run.
Alternatively, COBOL program can execute TSO commands which include FTP, please google it if you want to change the FILENAME dynamically inside of the program.
Thanks, |
|
Back to top |
|
|
swapnilushinde
New User
Joined: 17 Mar 2009 Posts: 30 Location: Bangalore.India
|
|
|
|
Hi
I have tried to change the filename dynamically in SMTP step using Symbolic variables. Unfortunately we cannot test FTP so may I know whether the same symbolic variables are valid in FTP also.
Here is the manual I referred :
www.lbdsoftware.com/XMITIP-Guide.pdf
I tried this thing :
Code: |
//S8 EXEC SMTPEMNJ
//SS1.CONTROL DD *
COMMAND SEND
FROM FTP@abc.COM
TO SSHINDE@abc.COM
ATTACH DDN:ATTACH1 &TIME_customer_data.TXT TRANSLATE
MARGIN 005
SUBJECT FTP-ATTACH
/*
//SS1.MESSAGE DD *
PLEASE FIND ACTUAL PAID REPORT AS ATTACHMENT
**DOUBLE CLICK TO 'OPEN' THE ATTACHMENT**
/*
//SS1.ATTACH1 DD DSN=filename,DISP=SHR
//* |
I tried to rename the file for each run by &TIME symbolic variable. I want to confirm whether it will work in FTP also.... |
|
Back to top |
|
|
dominickim
New User
Joined: 28 Feb 2007 Posts: 65 Location: NS, CA
|
|
|
|
Hello Swapnil,
I am wondering the issue has been resolved.
Have you tried that Douglas and I suggested?
Thanks,
Dominic |
|
Back to top |
|
|
swapnilushinde
New User
Joined: 17 Mar 2009 Posts: 30 Location: Bangalore.India
|
|
|
|
Hi dominickim,
We cannot test FTP in test region. We are trying to get access for it.. That's why I want some surety that same symbolic variable will work in FTP also so that I can persuade upper management for access.
Please let me know whether it will work in FTP or not??
Thanks for your suggestion... |
|
Back to top |
|
|
dominickim
New User
Joined: 28 Feb 2007 Posts: 65 Location: NS, CA
|
|
|
|
Hello Swapnil,
First of all, the &TIME is not valid symbolic name.
Second, symbolic variables can not be overwritten if it placed inside of SYSIN cards that system does not consider as part of JCL.
Thanks,
Dominic |
|
Back to top |
|
|
abin
Active User
Joined: 14 Aug 2006 Posts: 198
|
|
|
|
This is a method commonly followed in my shop.
Step 0. Delete temporary FTP file
Step 1. Read the FTP card and change the file name and write into a temporary FTP file.
Step 2. FTP using temporary file. |
|
Back to top |
|
|
abin
Active User
Joined: 14 Aug 2006 Posts: 198
|
|
|
|
Step 1. Read the FTP card and change the file name and write into a temporary FTP file.
This step needs to be done using a program or a sort card or whatvere normal data processing utility. |
|
Back to top |
|
|
dominickim
New User
Joined: 28 Feb 2007 Posts: 65 Location: NS, CA
|
|
|
|
Hello Abin,
That's exactly what we are using, too and I suggested earlier.
Thanks for your details.
Thanks,
Dominic |
|
Back to top |
|
|
karthik_sripal
New User
Joined: 28 Mar 2008 Posts: 69 Location: 125.16.180.5
|
|
|
|
This is exactly an issue we faced sometime back,
what we have done is we generated the FTP control card having date and time appended to the destination file name like the one below shown below
using a sort card
I can share the code happily used if required, please write back |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Quote: |
I can share the code happily used if required, please write back |
Please do.
Your solution will later help someone else with a similar question as well as people already participating in this topic
d |
|
Back to top |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
Hi Dick,
This is what we use here.
FTP card
Code: |
----+----+----+----+----+----+----+----+----+----+----+
cd /aaa/bbbb/cccc/dddd/eee/
TYPE A
ASCII
put 'SOME.MAINFRAM.FILE1(+0)' +
SOME_FILE_NAME1_
put 'SOME.MAINFRAM.FILE2(+0)' +
SOME_FILE_NAME2_
put 'SOME.MAINFRAM.FILE3(+0)' +
SOME_FILE_NAME3_
close
quit |
Sort step before FTP
Code: |
SORT FIELDS=COPY
INREC IFTHEN=(WHEN=(1,3,CH,EQ,C' '),OVERLAY=(30:&DATE4,49:C'.csv')) |
SORT Output
Code: |
cd /aaa/bbbb/cccc/dddd/eee/
TYPE A
ASCII
put 'SOME.MAINFRAM.FILE1(+0)' +
SOME_FILE_NAME1_2009-06-01-05.22.44.csv
put 'SOME.MAINFRAM.FILE2(+0)' +
SOME_FILE_NAME2_2009-06-01-05.22.44.csv
put 'SOME.MAINFRAM.FILE3(+0)' +
SOME_FILE_NAME3_2009-06-01-05.22.44.csv
close
quit |
|
|
Back to top |
|
|
swapnilushinde
New User
Joined: 17 Mar 2009 Posts: 30 Location: Bangalore.India
|
|
|
|
HI Karthik
thanks a lot for your valuable reply. That's the thing I wanted to do. Please share the more information regarding this and if possible please send some manuals or PDF's.
Once again thanks.. |
|
Back to top |
|
|
|