Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

I want to insert date & time in a file which is empty

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
napoleon_cse

New User


Joined: 27 Feb 2006
Posts: 7

PostPosted: Tue May 23, 2006 8:59 pm    Post subject: I want to insert date & time in a file which is empty
Reply with quote

Using sort, I want to insert date & time in a file which is empty.

Note: My sort step requires only one input file i.e. the empty file..

Can somebody help me by providing the syntax?
Back to top
View user's profile Send private message

Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Tue May 23, 2006 9:12 pm    Post subject:
Reply with quote

Using the empty file as input and output for this kind of thing seems like a silly requirement, but if that's what you really want to do, you can use a DFSORT job like this:

Code:

//S1    EXEC  PGM=ICEMAN                     
//SYSOUT    DD  SYSOUT=*                     
//SORTIN DD DSN=userid.file,DISP=SHR     
//SORTOUT DD DSN=userid.file,DISP=OLD     
//SYSIN    DD    *                           
  SORT FIELDS=(1,1,CH,A)                     
  OUTFIL REMOVECC,NODETAIL,                   
    TRAILER1=(DATE,TIME)               
/*     


Note that userid.file must have valid attributes (RECFM, LRECL, BLKSIZE). This will give you an output record in userid.file of:

mm/dd/yyhh:mm:ss

You can use different DFSORT parameters to get different formats for the date and time if appropriate.
Back to top
View user's profile Send private message
napoleon_cse

New User


Joined: 27 Feb 2006
Posts: 7

PostPosted: Wed May 24, 2006 11:41 am    Post subject: Re: I want to insert date & time in a file which is empt
Reply with quote

My actual requirement was to edit a file using an IBM utility...

basically the step will have only one file and i'll write some records on it using the utility...

Thanks for the reply...

It would be great if u can tell me any other ways to achieve the requirement...
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Wed May 24, 2006 8:42 pm    Post subject:
Reply with quote

You need to do a better job of defining your requirements if you want somebody to help you. However, if this is a class assignment, you should really do your own homework.
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 -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. Full Time COBOL Software Development ... shally Mainframe Jobs 0 Fri Jan 20, 2017 5:24 am
No new posts CICS transaction slow response time vasanthz All Other Mainframe Topics 2 Thu Jan 19, 2017 1:31 am
No new posts SORTJOIN - Copy Matched and Unmatched... Steve Ironmonger DFSORT/ICETOOL 5 Tue Jan 17, 2017 4:26 pm
No new posts Copy RECFM =VB TO FB file with RECL =... sahil41352 DFSORT/ICETOOL 3 Wed Dec 28, 2016 11:29 pm
No new posts DD DUMMY & CPU TIME Nileshkul Testing & Performance analysis 16 Mon Dec 19, 2016 11:35 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us