OnDemand User Group
Support Forums => z/OS Server => Topic started by: lfbeach on March 24, 2016, 07:54:48 AM
-
I'm trying to load a CSV file and have tried as line data, and then tried loading with generic indexer and it is not working for me. It actually loaded as line data....but the view in our Enhanced Seamless Search viewer is not good. The customer wants to be able to put the data into a spreadsheet. What is the proper AG and APP setup to load a CSV? Appreciate any input. Thanks, Lori
-
Here's one method:
Q1. Can you use the generic indexer ?
A1. Yes
Q2. for app def, would data type be User Defined ?
A2. yes
Q3. and File Extension set to csv ?
A3. yes. make sure you use "csv" and not ".csv"
Q4. and once archived, if the user wants to use the archived doc for use in an xcel work sheet, do they just copy the doc to file then to the spreadsheet ?
A4. The OnDemand client will download the .csv file into its temporary work directory. Then it will pass control to windows which will use the default program associated in windows for any .csv files. If there is more than one program associated with .csv then you will get the windows dialog that asks which program you want to open the .csv file with. There should not be any need to copy the file from the OnDemand client working directory manually into a program.
Ed
-
Thank you Ed! So....if my load is failing....then my files are set up incorrectly for the GI load. This is what I'm getting....
DSNALI OPEN call failed with CAF-RC/CAF-RE = 0000000C/00F30006
********************************* TOP OF DATA **********************************
arsload: Using /u/arsss/tmp1 for temporary files
arsload: Processing file >/u/arssp/tmp1/ARSSJLFN<
The userexit >/u/arsss/product/bin/exits/arsuupdt< failed. The return code is 16
arsload: Processing failed for file >/u/arssp/tmp1/ARSSJLFN<
arsload: Processing has stopped. The remaining files will NOT be processed.
******************************** BOTTOM OF DATA ********************************
-
Ed, scratch that....I finally got it to load. NOW my file looks like binary garbage when I view. I've tried extension txt and extension csv. how do I properly send the file to USS to keep the formatting correct? We are using an ICETOOL copy - these are parameters:
//DD3 DD PATH='/u/&ENV4/tmp1/&JNAM..ind',
// PATHDISP=(KEEP,DELETE),
// PATHOPTS=(ORDWR,OCREAT,OTRUNC),
// PATHMODE=(SIRWXU,SIRWXG,SIRWXO),
// FILEDATA=TEXT
//DD4 DD PATH='/u/&ENV4/tmp1/&JNAM..out',
// PATHDISP=(KEEP,DELETE),
// PATHOPTS=(ORDWR,OCREAT,OTRUNC),
// PATHMODE=(SIRWXU,SIRWXG,SIRWXO),
// FILEDATA=TEXT
-
should I open a pmr on this one? I'm attaching a screenshot of the host file I'm attempting to load and then what the view looks like in the windows thick client.
-
Where is the current copy of the "good" file that you can just browse?
In a regular old MVS dataset like DD DSN=USER.DATA.LORI.CSV,DISP=SHR ?
Ed
-
yes it's in a regular old mvs dataset. I've got to convert ebcdic to ascii don't I. is that the step I'm missing?
Recommendation on how easiest to do that?
-
yes it's in a regular old mvs dataset. I've got to convert ebcdic to ascii don't I. is that the step I'm missing?
Recommendation on how easiest to do that?
Could you give this a try and see if it does what you want?
//COPYSTEP EXEC PGM=IKJEFT01
//OUTHFS DD PATH='/u/test99/sample3.out',
// PATHOPTS=(OWRONLY,OCREAT,OTRUNC),
// PATHMODE=(SIRWXU,SIRGRP,SIXGRP,SIROTH,SIXOTH)
//INMVS DD DISP=SHR,DSN='TEST99.SAMPLE.OUT'
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD *
OCOPY INDD(INMVS) OUTDD(OUTHFS) TEXT CONVERT(NO)
/*
Ed
-
That's it! You're a genius. It's not loading for me yet....but the file on USS sure looks better. Will plug away a bit more and may have another question if I can't get it to 'take'.
-
Ed, I am closer. I had to run a convert on the host file:
CONVERT EBCDIC TO ASCII
using ‘ETOA’
And now my data loads...and looks better...but it is loading as one continuous string instead of individual
comma delimited records. (screenshot attached)
-
Sounds like you're loading the document as just one line...with the generic indexer you have to feed CMOD the offset and length of each individual record.
For example:
GROUP_OFFSET:00000000
GROUP_LENGTH:00002760
GROUP_OFFSET:00002760
GROUP_LENGTH:00002760
GROUP_OFFSET:00005520
GROUP_LENGTH:00002760
GROUP_OFFSET:00008280
GROUP_LENGTH:00002760
Instead of copying the MVS dataset with parms I suggested previously and then running a conversion see if you can just use this:
//STEP1 EXEC PGM=IKJEFT1B
//SYSOUT DD SYSOUT=*
//STDOUT DD SYSOUT=*
//STDERR DD SYSOUT=*
//INMVS DD DISP=SHR,DSN=TEST99.DATASET
//OUTHFS DD PATHDISP=(KEEP,KEEP),
// PATHOPTS=(ORDWR,OCREAT),
// PATHMODE=(SIRWXU,SIXUSR),
// PATH='/u/test99/test99.dataset'
//SYSPRINT DD *
//SYSTSPRT DD DUMMY
//SYSTSIN DD *
OCOPY INDD(INMVS) OUTDD(OUTHFS) BINARY
/*
Ed
-
Ed,
You are absolutely right...that's what I'm doing. But the customer wants to view this as a single document.
So they don't want each line loaded with different indexes, as a different entities.
Is it possible to load them as a single document? But still have the LINES view sequentially instead of strung together? (like so....). or am I reaching for the impossible here?
BROWSE TEST.ARSS.R6683.PREVAIL.RF80 L
Command ===>
********************************* Top of Data *********
AL, ,G ,S5498,00,00,2014-11-24,9901-01-01,000000700
AL,001,F ,A0030,00,00,1996-01-01,2000-12-31,000200000
AL,001,F ,A0040,00,00,1996-01-01,2000-12-31,000200000
AL,001,F ,A0130,00,00,1999-01-01,9901-01-01,000002500
AL,001,F ,A0300,00,00,1996-01-01,2000-12-31,000013000
AL,001,F ,A0302,00,00,1996-01-01,2000-12-31,000013000
AL,001,F ,A0304,00,00,1996-01-01,2000-12-31,000026000
AL,001,F ,A0308,00,00,1996-01-01,2000-12-31,000026000
AL,001,F ,A0310,00,00,1996-01-01,2000-12-31,000026000
AL,001,F ,A0320,00,00,1996-01-01,2000-12-31,000013000
AL,001,F ,A0322,00,00,1996-01-01,2000-12-31,000013000
AL,001,F ,A0324,00,00,1996-01-01,2000-12-31,000026000
AL,001,F ,A0326,00,00,1996-01-01,2000-12-31,000026000
AL,001,F ,A0328,00,00,1996-01-01,2000-12-31,000026000
AL,001,F ,A0330,00,00,1996-01-01,2000-12-31,000026000
AL,001,F ,A0342,00,00,1996-01-01,2000-12-31,000013000
AL,001,F ,A0348,00,00,1996-01-01,2000-12-31,000026000
AL,001,F ,A0350,00,00,1996-01-01,2000-12-31,000026000
AL,001,F ,A0360,00,00,1996-01-01,2000-12-31,000013000
-
I'm out of bullets at this time...hoping someone else jumps in who is already doing this.
Ed
-
So you aren't going through the fat client to do this? We send a lot of items to excel but do it through the fat client which simplifies the process.
-
did you introduce line break for each line?
-
Sounds like you are converting the data too much to start with. If this is a true CSV file created on a distributed system the line feeds should already exist. The file should be sent to Z/OS as a binary file and then loaded with the generic indexer. No conversion required.
OnDemand only puts out what you put in. :)
-
This was the final step to make this work. End of each line needs a hex'0D15' (and convert EBCDIC to ASCII)
SORT FIELDS=COPY
INREC BUILD=(1:1,78,X'0D15')
OUTREC OVERLAY=(1:1,80,TRAN=ETOA)
Thanks for all assistance!
-
Lori - thank you for closing the loop on this one and giving the final solution.
Ed