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: Wed Sep 05, 2012 2:54 pm Post subject: How to fetch and compare the system date in JCL
Can some one help me on this....I need to fetch the system date and sort the PS record matching with system date.................i used the following method but getting o/p blank............date in PS record in the format yyyymmdd ........... if i can get yymmdd also fine
if the format of the date in the file is yyyymmdd
why are you building your compare as: CURDAT,S'&DAY.&MON.&YR2'
had you bothered to look at the output of your sort
(the part that details what sort is doing)
you would have seen what was being created
and maybe you would have not embarrassed yourself with such a silly post.
oh yeah, welcome to the forum. nice start! _________________ Dick Brenholtz
JCL, SQL and code in programs have an irritating habit of doing what you say,
not what you meant.
Then can you please suggest me how to compare the PS records with system/current date..............
Correct your sort control statements and it should work.
You insist on SYSNAMES but this is not supported by the sort. You can add all of the DD statements you want to a job and they will have almost no impcat - they just will not be used as input/output if the progrm does not know of them.
Rearrange the order of the data you retrieve from the system to the format you need - not something you copied from some other question/solution. _________________ Have a good one
Last edited by DikDude on Wed Sep 05, 2012 9:08 pm; edited 1 time in total
Joined: 24 Jul 2011 Posts: 650 Location: Down on the pig farm
Posted: Wed Sep 05, 2012 9:04 pm Post subject:
Your question has next to nothing to do with JCL - apart from the fact that you do not seem to understand JCL. It is mostly to do with SORT and SYNCSORT in particular. So...why did you post in the JCL part of the forum instead of the Sort part of the forum - the one immediately underneath the JCL section.
Your JCL problem can be resolved by looking at the JCL requirements of SYNCSORT in the SYNCSORT manual - and possibly some of your other problems, too. _________________ Regards
Joined: 09 Aug 2008 Posts: 1625 Location: Mumbai, India
Posted: Thu Sep 06, 2012 5:44 pm Post subject:
vijay_10b - please learn to use the BBCode Tags. I've edited your post to add them. However, "PS record format", from your post does not seem to be aligned well.
OTOH, I don't understand what are you asking. You said
need to fetch the system date and sort the PS record matching with system date
- but you show SORT statements using INCLUDE only those records which are less than current date. Perhaps, an example of input records along with expected output would be nice. _________________ Regards,
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