I have generated a file with date and time . And we will receive multiple files
a day. each file will be created with date and time in the name and I want to merge all the file and copy it into a GDG. How do I refer to this files in JCL
Joined: 10 May 2007 Posts: 2455 Location: Hampshire, UK
They are datasets not files (unless you are using USS).
Write a program in a language of your choice and do the following:
LISTC of the high level indicies
extract those created today
generate the JCL to concatenate those datasets
submit the JCL
Save the JCL (in the event of failure)
)CM Demo use of TSO / REXX features in an ISPF skeleton
)CM Make DD concatenation
)CM Make list of datasets
)REXX STACKN
zz=outtrap('lst.')
"listcat lvl("userid()".test) nonvsam"
zz=outtrap('off')
"delstack"
do n=1 to lst.0
if word(lst.n,1)<>'NONVSAM' then iterate
dsn=word(lst.n,3)
zz=Listdsi("'"dsn"'")
if sysdsorg='PO' then queue word(lst.n,3)
end
STACKN=queued()
)ENDREXX
)CM Make DD statement
)SET DD = INPUT
)DO N = 1 TO &STACKN
)REXX DSN DD STMT
pull dsn
stmt= '//'left(dd,8) 'DD DISP=SHR,DSN='dsn
dd=''
)ENDREXX
&STMT
)ENDDO
I have generated a file with date and time . And we will receive multiple files
a day. each file will be created with date and time in the name and I want to merge all the file and copy it into a GDG. How do I refer to this files in JCL
Why don't to talk to OPC/Scheduling group? How are you getting the data set?NDM or SFTP? Just do the +1 GDG as and when you get the Data set and concate (0) and (+1) to get (+2) and it will do the task and always you will have a roll over data and latest one instead of waiting at the end and convolute the process of merge.
Joined: 31 Oct 2006 Posts: 1042 Location: Richmond, Virginia
Does this do what you want?
1. Land each day's datasets as successive new generations of a daily GDG
2. At end of day, copy the concatenation of all of the daily generations to the next generation of your permanent GDG
3. Delete all generations of the daily GDG
Whether this or a previous reply worked for you, please let us know. As a new member, you'll find people really appreciate feedback.