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

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: 1742
Location: Tirupur, 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

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
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: 1742
Location: Tirupur, 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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Data set Rec-Cnt and Byte-Cnt Testing & Performance 2
No new posts SCOPE PENDING option -check data DB2 2
No new posts Check data with Exception Table DB2 0
No new posts JCL EXEC PARM data in C Java & MQSeries 2
This topic is locked: you cannot edit posts or make replies. Automation need help in sorting the data DFSORT/ICETOOL 38
Search our Forums:

Back to Top