View previous topic :: View next topic
|
Author |
Message |
Senthilraj
New User
Joined: 26 Jun 2009 Posts: 5 Location: Chennai, India
|
|
|
|
I have a job scheduled on CA7 which will run on the last day of every month. I want this job to write a text "MONTHLY RUN" to a file (GDG) which will later be used by other programs for some month end processing.
Is it possible to do this with SORT by giving the text "MONTHLY RUN" in the control statements directly. I am aware that I could have this text in a sample file and then do a copy in the job. But I want to avoid creating this sample file in production. I don't want to have any other programs. |
|
Back to top |
|
|
Gnanas N
Active Member
Joined: 06 Sep 2007 Posts: 792 Location: Chennai, India
|
|
|
|
It looks simple to me.
With SORT,
SORTIN as MONTHLY RUN , SORTOUT as GDG Generation with SYSIN as OPTION COPY
or
With IEBGENER or IDCAMS REPRO... ?
or Am I missing something here? |
|
Back to top |
|
|
Bill Dennis
Active Member
Joined: 17 Aug 2007 Posts: 562 Location: Iowa, USA
|
|
|
|
<Gnana beat me to to the reply!>
How about (untested code):
Code: |
//STEP1 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD *
MONTHLY RUN
//SORTOUT DD DSN=YOUR.GDG(+1),DISP and other parms
//SYSIN DD *
SORT FIELDS=COPY |
|
|
Back to top |
|
|
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1742 Location: Tirupur, India
|
|
|
|
Hi,
I had a doubt that the above code might fail with LRECL mismatch or something when used with SORT. But it did not. It can be called as tested code. Working.
Thanks & Regards, |
|
Back to top |
|
|
Senthilraj
New User
Joined: 26 Jun 2009 Posts: 5 Location: Chennai, India
|
|
|
|
Thanks to all.....I got what I was looking for. |
|
Back to top |
|
|
|