MAINFRAME - TIP OF THE DAY :
When you specified V for RECFM parameter, LRECL value is largest record in the file plus 4 bytes. These four bytes contain the actual length of each variable length record in the file
Programmers Voted for below topics. Please Vote for good Posts.
Thank You! for your feedback. Connecting to the server. Please Wait...
Posted: Fri Jul 23, 2010 3:43 am Post subject: Find and Replace string with current Date
My requirement is to replace the '########' string with current date in a SFTP control member.
get 'ETOLDAG_000003_########.csv' 'UGLXCD.EBAXMD.NETWORK.TEST'
rename 'ETOLDAG_000003_########.csv' 'ETOLDAG_000003_########.csv.taken'
get 'ETOLDAG_000003_20100722.csv' 'UGLXCD.EBAXMD.NETWORK.TEST'
rename 'ETOLDAG_000003_20100722.csv' 'ETOLDAG_000003_20100722.csv.taken'
I have coded the jcl given below to satisfy my current requirement. The same SFTP control card will be used in future to handle additional files. The current solution depends on the position of the string '########' and won't work if the filename character is increased
Can this be handled using FINDREP or any alternative solution to search the string at any position and replace with current date.?
If there is something in a fixed position with a value, or even an otherwise unique value to identify the first record, you can use that. If not, you can append/prepend a sequence number and test for a value of one,
Fist of all, the name is Yaeger - it is important to use the correct name ahen a name is used.
Second - please do NOT address a question to a particular individual. In this case, Frank is no longer on the forum. He retired a year ago.
And last - it is best to start a new topic for your new question rather than posting a reply to a topic that has been dormant 3+ years. A link to the original topic may be included in ypour post if you want to refer to some other topic.
Good luck and enjoy the forum _________________ Have a good one
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
Cobol Tutorial This cobol tutorial covers most of the important topics like STRING, UNSTRING, COMP, COMP-3.....
DB2 Tutorial DB2 Tutorial focuses on DB2 COBOL Programming. Explains in simple language. Some Chapters are locked, Forum members have free access to these chapters
CICS Tutorial This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming...
JCL Tutorial This is most popular JCL tutorial from mainframegurukul. It does contain important jcl ....
SORT Tutorial This Tutorial covers all important aspects of DFSORT. Has more SORT examples