IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

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


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
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
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 Developer


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

PostPosted: Tue May 23, 2006 9:12 pm
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
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 Developer


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

PostPosted: Wed May 24, 2006 8:42 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Replacing 'YYMMDD' with date, varying... SYNCSORT 3
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
Search our Forums:

Back to Top