Posted: Wed Mar 24, 2010 5:04 pm Post subject: Include input date in filename and in Header and trailer
Hi All,
I need to achive the following tasks using SORT or any other utility.
My Input file is FB and LRECL is 511 (it is in STEP020)
1.I want to include the date from input dataset into the Headers and also the run date and time in the header
2.I want to include only the count of 'BPR' records (Start position is 1 and length 3) in the Trailer 2. I don't want leading zeros or space in the count.
3.The out put dataset name in STEP020 should be created with TEST.DYYMMDD (YYMMDD will be the date from input file).
I have completed the task 1 and part of task 2 using SORT I don't know how to include only count of BPR in trailer 2 (as of now I am including count of all records with leading spaces, I don't want leading spaces).
For task 3 I know how to create a dataset name with system date and time by using the EZACFSM1 program and &LYYMMDD system variable but I don't know how to create a dataset with input date.
I have used my first step to get the date from the input file and it looks as follows, this date will be changing every day so I don't want to hard code this date in my step.
Quote:
201003233MARCH 08208220100323NNN3MARCH
For Task 3 I want to use the input file date rather than the system date because my job might run any time depending on dependies for this job. Can we do that with EZACFSM1 ? _________________ Regards,
Chandra
Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
Posted: Wed Mar 24, 2010 7:06 pm Post subject:
chandra wrote:
For Task 3 I want to use the input file date rather than the system date because my job might run any time depending on dependies for this job. Can we do that with EZACFSM1 ?
Chandra,
Your input date is 8 bytes and you canNOT define the dataset with one of the qualifier starting with a numeric. In your requirement you wanted userid.RUNDATE. You need to have an alphabet as a prefix in qualifier. So come up with a good naming convention for the output dataset
If you are ok with creating the dataset as USERID.Yaaaa.Mbb.Dcc (where aaaa = 4 digit year from position 1 for 4 bytes in your input run date file, bb = mm from position 5 for 2 bytes in your input run date file and cc = dd from position 7 for 2 bytes in your input run date file) then use the following DFSORT JCL
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