IBM Mainframe Forum Index
 
Register
 
IBM Mainframe Forum Index Mainframe: Search Log in to check your private messages Log in
 

Symbolic vaiable in procs instream data


 
IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
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
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: 1689
Location: Tiruppur, India

PostPosted: Fri Jan 16, 2015 5:06 pm
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: 4650
Location: Raleigh, NC, USA

PostPosted: Fri Jan 16, 2015 7:54 pm
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: 1689
Location: Tiruppur, India

PostPosted: Fri Jan 16, 2015 8:00 pm
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 All times are GMT + 6 Hours
Forum Index -> JCL & VSAM
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Forum Replies
No new posts How to find which file contains my se... DFSORT/ICETOOL 6
No new posts Changing Data Type SYNCSORT 4
No new posts Copying data from prev record using SORT SYNCSORT 19
No new posts how to get total count from numeric d... SYNCSORT 9
No new posts Map a data element to SPACES if it is 0 COBOL Programming 2

Back to Top