Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Writing text into a dataset

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
Senthilraj

New User


Joined: 26 Jun 2009
Posts: 5
Location: Chennai, India

PostPosted: Wed Oct 28, 2009 12:50 am    Post subject: Writing text into a dataset
Reply with quote

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
View user's profile Send private message

Gnanas N

Active Member


Joined: 06 Sep 2007
Posts: 788
Location: Chennai, India

PostPosted: Wed Oct 28, 2009 12:57 am    Post subject:
Reply with quote

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
View user's profile Send private message
Bill Dennis

Active Member


Joined: 17 Aug 2007
Posts: 562
Location: Iowa, USA

PostPosted: Wed Oct 28, 2009 1:01 am    Post subject:
Reply with quote

<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
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1522
Location: Chennai

PostPosted: Wed Oct 28, 2009 1:16 am    Post subject:
Reply with quote

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. icon_biggrin.gif

Thanks & Regards,
Back to top
View user's profile Send private message
Senthilraj

New User


Joined: 26 Jun 2009
Posts: 5
Location: Chennai, India

PostPosted: Wed Oct 28, 2009 10:54 am    Post subject: Reply to: Writing text into a dataset
Reply with quote

Thanks to all.....I got what I was looking for.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Copy 4 byte of data from the last rec... arunsoods DFSORT/ICETOOL 9 Fri Oct 06, 2017 12:15 pm
No new posts opening a dataset after reading it fr... arunsoods DFSORT/ICETOOL 5 Wed Oct 04, 2017 3:54 pm
No new posts Updating the Trailer count in variabl... satheshbabur DFSORT/ICETOOL 6 Wed Aug 30, 2017 9:49 pm
No new posts Mainframe dataset split purushottam DFSORT/ICETOOL 13 Tue Aug 29, 2017 12:28 pm
No new posts Sorting on text - but in non-alphabet... Roy Ware SYNCSORT 5 Wed Aug 23, 2017 9:15 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us