MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Inserting a record into an empty dataset

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL)
View previous topic :: View next topic  
Author Message
maverick
Beginner


Joined: 05 Jun 2003
Posts: 7
Topics: 3

PostPosted: Thu Jun 05, 2003 9:53 am    Post subject: Inserting a record into an empty dataset Reply with quote

I need to insert a single record into a newly created dataset. The format of the record is fixed - it consists of two fields, a 30 byte field to be filled with zeroes and an 8-byte date field to contain system date. It is up to me to decide upon the way to go about it.
Although this can be done using a simple COBOL program or better still a REXX one, I'd like to know whether it is possible to get it done using any utility, say DFSORT? How does one pass the system date in that case?
Cheers
Back to top
View user's profile Send private message
Frank Yaeger
Sort Forum Moderator
Sort Forum Moderator


Joined: 02 Dec 2002
Posts: 1618
Topics: 31
Location: San Jose

PostPosted: Thu Jun 05, 2003 10:12 am    Post subject: Reply with quote

Yes, you can use DFSORT to do that. For example:

Code:

//S1 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD *
DUMMY RECORD
/*
//SORTOUT DD DSN=...   output file
//SYSIN DD *
  OPTION COPY
  OUTREC FIELDS=(30C'0',DATE1,n:X)
/*


30C'0' will give you 30 character zeros. If you want binary zeros, use 30X'00' or 30Z.

DATE1 will give you a character date of 'yyyymmdd'. DATE1(/) will give you a character date of 'yyyy/mm/dd'. Other DATEn and DATEn(c) parameters are available as well as discussed in the "How can I put timestamps in my output records?" Ask Professor Sort item at:

http://www.ibm.com/servers/storage/support/software/sort/mvs/professor_sort/

n should be the LRECL you want for your output data set.
_________________
Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort


Last edited by Frank Yaeger on Fri Aug 25, 2006 5:54 pm; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail Visit poster's website
maverick
Beginner


Joined: 05 Jun 2003
Posts: 7
Topics: 3

PostPosted: Thu Jun 05, 2003 10:33 am    Post subject: Reply with quote

Thanks very much, Frank.
Cheers
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL) All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group