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: 1461
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: 1461
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 JCL to get submitted once dataset has... vinu78 JCL & VSAM 17 Thu Feb 16, 2017 7:32 am
No new posts Submit job from Cobol with input data abdulrafi COBOL Programming 4 Wed Feb 01, 2017 12:41 pm
No new posts Sorting group data rajella DFSORT/ICETOOL 4 Sun Jan 22, 2017 11:32 pm
No new posts Storing huge volume of data, compare ... Pradeep K M All Other Mainframe Topics 3 Mon Jan 16, 2017 5:08 pm
No new posts how to recover an uncataloged VSAM da... archanamuthukrishnan All Other Mainframe Topics 3 Wed Jan 11, 2017 6:18 pm


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