IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Changing a SYSIN Control card in Runtime...


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
swapnilushinde

New User


Joined: 17 Mar 2009
Posts: 30
Location: Bangalore.India

PostPosted: Wed May 20, 2009 2:18 pm
Reply with quote

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

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Wed May 20, 2009 2:46 pm
Reply with quote

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

New User


Joined: 17 Mar 2009
Posts: 30
Location: Bangalore.India

PostPosted: Wed May 20, 2009 3:35 pm
Reply with quote

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

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Wed May 20, 2009 3:58 pm
Reply with quote

Quote:
Here I want to change the name FILENAME1 for next run without manually changing it
Okay ... good luck with that.
Back to top
View user's profile Send private message
swapnilushinde

New User


Joined: 17 Mar 2009
Posts: 30
Location: Bangalore.India

PostPosted: Wed May 20, 2009 4:50 pm
Reply with quote

I know this is impossible but just wanted to double check with others...
Back to top
View user's profile Send private message
Douglas Wilder

Active User


Joined: 28 Nov 2006
Posts: 305
Location: Deerfield IL

PostPosted: Wed May 20, 2009 7:44 pm
Reply with quote

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

New User


Joined: 28 Feb 2007
Posts: 65
Location: NS, CA

PostPosted: Wed May 20, 2009 8:01 pm
Reply with quote

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

New User


Joined: 17 Mar 2009
Posts: 30
Location: Bangalore.India

PostPosted: Fri May 22, 2009 10:53 am
Reply with quote

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

New User


Joined: 28 Feb 2007
Posts: 65
Location: NS, CA

PostPosted: Fri May 29, 2009 3:39 pm
Reply with quote

Hello Swapnil,

I am wondering the issue has been resolved.
Have you tried that Douglas and I suggested?

Thanks,
Dominic
Back to top
View user's profile Send private message
swapnilushinde

New User


Joined: 17 Mar 2009
Posts: 30
Location: Bangalore.India

PostPosted: Fri May 29, 2009 7:23 pm
Reply with quote

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

New User


Joined: 28 Feb 2007
Posts: 65
Location: NS, CA

PostPosted: Fri May 29, 2009 9:18 pm
Reply with quote

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

Active User


Joined: 14 Aug 2006
Posts: 198

PostPosted: Sat May 30, 2009 3:29 am
Reply with quote

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

Active User


Joined: 14 Aug 2006
Posts: 198

PostPosted: Sat May 30, 2009 3:30 am
Reply with quote

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

New User


Joined: 28 Feb 2007
Posts: 65
Location: NS, CA

PostPosted: Sat May 30, 2009 9:29 pm
Reply with quote

Hello Abin,

That's exactly what we are using, too and I suggested earlier.
Thanks for your details.

Thanks,
Dominic
Back to top
View user's profile Send private message
karthik_sripal

New User


Joined: 28 Mar 2008
Posts: 69
Location: 125.16.180.5

PostPosted: Sun May 31, 2009 12:00 pm
Reply with quote

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

Code:

Use [URL] BBCode for External Links                                     
cd cds1                                                 
PUT 'MAINFRAME FILE' FILENAME1.date.time.txt
CLOSE                                                   
QUIT                                                   
     


I can share the code happily used if required, please write back icon_smile.gif
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Sun May 31, 2009 12:09 pm
Reply with quote

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 icon_smile.gif

d
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Mon Jun 01, 2009 5:46 pm
Reply with quote

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

New User


Joined: 17 Mar 2009
Posts: 30
Location: Bangalore.India

PostPosted: Tue Jun 02, 2009 12:50 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts JCL sort card - get first day and las... JCL & VSAM 9
No new posts Using Dynamic file handler in the Fil... COBOL Programming 2
No new posts changing defaults in db2 admin - Unlo... DB2 0
No new posts Generate output lines (SYSIN card for... DFSORT/ICETOOL 4
No new posts Need suggestion on a sort card DFSORT/ICETOOL 10
Search our Forums:

Back to Top