View previous topic :: View next topic
|
Author |
Message |
GautamSid
New User
Joined: 04 Jun 2021 Posts: 7 Location: India
|
|
|
|
Hi,
I have a connect direct job to be sent from PNODE to SNODE.
Pnode is a normal Mainframe GDG file.
Snode file has to be something in this format
/path1/path2/filename_DDMMYYYY.txt
where ddmmyyyy is previous days date.
I'm able to get current date using below code but struggling to append previous date at the end. &date1-1 doesnt seem to be working.
method used:
Symbol &Rdsn = path1/path2/
Symbol &dd = &date1
Symbol &ext = . txt
snode dsn = "&Rdsn.&dd.&ext"
Your inputs would be much appreciated!! |
|
Back to top |
|
|
sergeyken
Senior Member
Joined: 29 Apr 2008 Posts: 2023 Location: USA
|
|
|
|
1) Where exactly in either JCL or VSAM have you found any word about “&date1-1” ???
2) what the term “method used” stands for?
3) please give the EXACT CODE SAMPLE you have used; do not forget to enclose your code into the code tags |
|
Back to top |
|
|
GautamSid
New User
Joined: 04 Jun 2021 Posts: 7 Location: India
|
|
|
|
With the below JCL I'm able to get the filename as
/PATH1/PATH2/FILENAME_CURRENTDATE.TXT
But I need it as
/PATH1/PATH2/FILENAME_YESTERDAYDATE.TXT
&DATE1-(-1) --> Usually we use this in SORT to get the yesterdaysdate, but that doesn't work here.
Code: |
PROCC1 PROCESS
SYMBOL &RDSN=\'/PATH1/PATH2/FILENAME_'\
SYMBOL &DD1=&DATE1
SYMBOL &TXT=.TXT
SYMBOL &SDSN=FILENAME.G0001V00
STEP2 COPY FROM(PNODE DSN=&SDSN DISP=SHR
DCB=(REC=FB, LRECL=3200,BLKSIZE=3200,DSORG=PS))
TO(SNODE DSN="&RDSN.&DD1.&TXT" DISP=RPL
DCB=(REC=FB, LRECL=3200,BLKSIZE=3200,DSORG=PS))
|
|
|
Back to top |
|
|
|