Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Symbolic vaiable in procs instream data

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
bhavya_sha

New User


Joined: 16 Apr 2005
Posts: 33

PostPosted: Fri Jan 16, 2015 4:45 pm    Post subject: Symbolic vaiable in procs instream data
Reply with quote

Hi,

I have a job to generate 34 files every monthl and same has to be FTPd to different system.

Now as we are automating this process for every month & job creates files with 'DYYMM' (D is character & 1601) as third qualifier.

I have a proc where sysin dataset is having symbolic variable(giving the 3rd qualifier dynamically) while FTPing DS.

But symbolic variable in a proc's sysin dsn is not getting expanded/replaced.

Would be of great help if any one helps with alternates to achieve the same.


Thanks & Regards,
Bhavya M S
Back to top
View user's profile Send private message

vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1445
Location: Azeroth

PostPosted: Fri Jan 16, 2015 5:06 pm    Post subject:
Reply with quote

Hello,

Not sure if there is a more effecient way to do this, I used to have SORT with symbolic substitution for dynamic date on filenames.

Code:
//SUBDATE  EXEC  PGM=SORT
//SYMNAMES DD *
YRMON,S'&YR2.&MON.'
//SORTIN   DD  *
 some control cards here...
 FTP FILENAME.DYYMM SOME.OUTPUT
/*
//SORTOUT  DD  DSN=&&TEMP1,DISP=(,PASS),SPACE=(TRK,1)
//SYSOUT   DD  SYSOUT=A
//SYSIN    DD  *
 OPTION COPY
 INREC FINDREP=(IN=C'YYMM',OUT=YRMON)
/*


Input :
Code:
 some control cards here...
 FTP FILENAME.DYYMM SOME.OUTPUT


Output: written to &&TEMP1 - this can be used as SYSIN in the following step.
Code:
 some control cards here...
 FTP FILENAME.D1501 SOME.OUTPUT


Hope it helps.
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4648
Location: Raleigh, NC, USA

PostPosted: Fri Jan 16, 2015 7:54 pm    Post subject: Reply to: Symbolic vaiable in procs instream data
Reply with quote

I work in Data Transmissions and we send lots of files everyday via FTP, SFTP and NDM with variable filenames. We either use Scheduler variables, system variables, or a combination of both. All of our jobs use a PROC of some sort.
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1445
Location: Azeroth

PostPosted: Fri Jan 16, 2015 8:00 pm    Post subject:
Reply with quote

Quote:
We either use Scheduler variables, system variables

I think using the scheduler variables would be more reliable than the SORT solution I posted. Since the SORT solution dates would vary if the job failed and the restart happens in the following day. Scheduler variable however would remain the same, if needed.

The SORT solution was for a quick and dirty user job.
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 -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts ODPP(Optim Data privacy Provider) Iss... Rama kishore IBM Tools 1 Mon Nov 07, 2016 5:46 pm
No new posts Can sending 5 MB data between cobol p... Kevin Vaz CICS 12 Tue Oct 18, 2016 4:50 pm
No new posts output data in CSV Format janmejay COBOL Programming 8 Sat Oct 15, 2016 2:20 pm
This topic is locked: you cannot edit posts or make replies. output data in CSV Format janmejay DFSORT/ICETOOL 3 Sat Oct 15, 2016 2:16 pm
No new posts FTP Server and FTP.DATA vasanthz All Other Mainframe Topics 2 Wed Oct 12, 2016 11:49 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us