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
No new posts editting the file by inserting zeros ... pramodrsingh DFSORT/ICETOOL 9 Mon Aug 21, 2017 5:58 pm
No new posts Match two files using multiple keys a... santoshks1987 SYNCSORT 11 Fri Aug 18, 2017 10:50 am
No new posts Multiple VSAM files single output fil... Mohan Kothakota DFSORT/ICETOOL 11 Wed Aug 09, 2017 7:57 pm
This topic is locked: you cannot edit posts or make replies. rexx code to create a ps file Bharath Vikraman CLIST & REXX 4 Mon Aug 07, 2017 10:30 am
No new posts Split file based on comparsion to 2 f... Div Grad DFSORT/ICETOOL 3 Thu Jul 27, 2017 9:16 pm


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