Author Topic: How to Archive Text File using parameter file in Z/OS  (Read 3932 times)

Rajat_Chakraborty

  • Guest
How to Archive Text File using parameter file in Z/OS
« on: May 17, 2011, 04:34:35 AM »
Hi,

Can anyone tell me how to archive a test file in Z/os using generic indexer. I have the input text file in Z/Os which i want to archive. I have created one Parameter file in Z/os to provide the index information. Where should i create the parameter file? is this file needs to be created in USS? for every batch do we need to change the indexer info in the parameter file in USS? Is there anyway to make changes in the parameter file in Z/Os and link that to USS or vice versa?

Greg Ira

  • Full Member
  • ***
  • Posts: 240
    • View Profile
Re: How to Archive Text File using parameter file in Z/OS
« Reply #1 on: May 18, 2011, 09:21:24 AM »
Hope I understood your question correctly.
The way I've archived text files with the generic indexer is to place the files, both the text file and the index paramater file in USS.  I seem to recall the generic indexer will only work against files in USS.
The index parm file contains the path and filename for the text file as GROUP_FILENAME.
Example for a single text file.  The file name is bldparms.ind :
CODEPAGE:500
GROUP_FIELD_NAME:Report_Title
GROUP_FIELD_VALUE:Install OnDemand client
GROUP_FIELD_NAME:Report_Date
GROUP_FIELD_VALUE:5/18/2011
GROUP_FIELD_NAME:Author
GROUP_FIELD_VALUE:Smith
GROUP_FIELD_NAME:Subject
GROUP_FIELD_VALUE:CMOD
GROUP_OFFSET:0
GROUP_LENGTH:0
GROUP_FILENAME:/etc/ond/32P/pcfile.input

The directory /etc/ond/32P would contain
.
..
pcfile.input
bldparms.ind

When I execute the command:
arsload -u smith -p xxxxx -h archive -a TEXTDOC -g PCDOCS -c /etc/ond/32P/temp /etc/ond/32P/bldparms

the text file will get loaded.

I do have a setup that would allow me to modify the parm file in z/OS and upload it to USS.
One member contains the parm file, lets say it's called PCDOCS:

CODEPAGE:500
GROUP_FIELD_NAME:Report_Title
GROUP_FIELD_VALUE:Install OnDemand client
GROUP_FIELD_NAME:Report_Date
GROUP_FIELD_VALUE:5/18/2011
GROUP_FIELD_NAME:Author
GROUP_FIELD_VALUE:Smith
GROUP_FIELD_NAME:Subject
GROUP_FIELD_VALUE:CMOD
GROUP_OFFSET:0
GROUP_LENGTH:0
GROUP_FILENAME:/etc/ond/32P/pcfile.input

My JCL will then copy it to the ZFS:

//COPYSTEP EXEC PGM=IKJEFT01
//OUTHFS   DD PATH='/etc/ond/32P/bldprms.ind',
//            PATHDISP=(KEEP,DELETE)
//*           PATHOPTS=(OWRONLY,OCREAT,OEXCL),
//*           PATHMODE=(SIRWXU,SIRWXG,SIRWXO)
//* if bldnprms.tmp does not exist uncomment the previous 2 lines
//*           PATHMODE=(SIRUSR,SIWUSR,SIRGRP,SIWGRP)
//INMVS    DD DISP=SHR,DSN=HLQ.ONDEMAND.PCLOAD.JCL(PCDOCS)
//SYSTSPRT DD SYSOUT=*
//SYSTSIN  DD *
OCOPY INDD(INMVS) OUTDD(OUTHFS) TEXT CONVERT(NO) PATHOPTS(USE)
/*

One major "gotcha" I've discovered with this method is that the process pads the parmfile with blanks which causes the load process fail.  I had to create a rexx exec on the USS that would strip the blanks.
Hope this helps some

Rajat_Chakraborty

  • Guest
Re: How to Archive Text File using parameter file in Z/OS
« Reply #2 on: May 18, 2011, 11:33:57 PM »
Hi Greg,

Thanks for your valuable inputs. It really helped. I would like to ask you one more question .i.e if i receive the input file (which is to be archived in Ondemand) in z/OS only then is there any way to link it to USS or we need to create the i/p file in USS always. By mentioneg the i/p file name (which reseides in Z/OS) in Parameter file, will arsload pick that from z/os?

Greg Ira

  • Full Member
  • ***
  • Posts: 240
    • View Profile
Re: How to Archive Text File using parameter file in Z/OS
« Reply #3 on: May 19, 2011, 05:42:03 AM »
The generic indexer does let you reference a DD name on z/OS for the input file.  I only gave it a quick try with no luck but then again I didn't put much effort into getting it to work.