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
 
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 BAMAD file IO Error m1985nehal CICS 1 Fri May 25, 2018 11:51 am
No new posts Process file after 7 days of hold charlessxavier All Other Mainframe Topics 4 Tue May 22, 2018 3:54 pm
No new posts TRAILER3 is creating blank record in ... kodeesm DFSORT/ICETOOL 3 Fri May 18, 2018 5:45 pm
No new posts Cobol program till a given time or fo... ankita agarwal COBOL Programming 7 Fri May 18, 2018 2:24 pm
No new posts Transfer of mainframe file to PC in Z... maxsubrat JCL & VSAM 4 Thu May 17, 2018 11:35 am

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