Quantcast
Channel: IBM Mainframe Computers Forums
Viewing all 8500 articles
Browse latest View live

All Other Mainframe Topics :: RE: converting a mainframe file with ASA CC to word document

$
0
0
Author: prino
Posted: Wed Apr 04, 2018 1:41 pm (GMT 5.5)

Currently driving from Vilnius to Oostende, but if you can wait a bit, I'm doing the same with some files, convert them into a very sparse .RTF format that loads in M$ Word and LibreOffice Writer without problems. You can find samples on my Google drive via the "set of programs" link in "Projects" on https://prino.neocities.org/indez.html The file to look for is "liftrtf.rar" and the original text files are in "lifttxt.rar". Basically I just add a few heading lines, end every line with "\par", and sprinkle in some "\page" tags.
_________________
Robert AH Prins
robert.ah.prins @ the.17+Gb.Google thingy
At last, a tiny bit of programming here... icon_smile.gif


COBOL Programming :: RE: Searching a table for the field name?

$
0
0
Author: Marso
Posted: Wed Apr 04, 2018 2:02 pm (GMT 5.5)

You can use DESCRIBE CURSOR and the SQLDA to get column names.

JCL & VSAM :: RE: VSAM File free space

$
0
0
Author: sancraig16
Posted: Wed Apr 04, 2018 7:29 pm (GMT 5.5)

We decided to go ahead with calculating free space based on LISTCAT. Examine seems to take much longer . We want to run it multiple times a day to capture any sudden growth in data sets.

How did you arrive at bytes of data figure of 578,433,720 ?

COBOL Programming :: RE: Searching a table for the field name?

$
0
0
Author: Rohit Umarjikar
Posted: Wed Apr 04, 2018 7:30 pm (GMT 5.5)

Why don't you create a temp table and load all the values of WS-RPT-FLD-DESC into it and then simply use the inner join to know the matches or LEFT Outer Join to know mismatches and matches instead of complicating the stuff?
_________________
Regards,
Rohit Umarjikar
A leader is one who knows the way, goes the way, and shows the way.

JCL & VSAM :: RE: VSAM File free space

$
0
0
Author: Robert Sample
Posted: Wed Apr 04, 2018 7:41 pm (GMT 5.5)

I misread the LISTCAT output to get my number, so my apologies. EXAMINE will definitely take longer than a LISTCAT -- EXAMINE is doing much more.

Why do you think you will have sudden growth in data sets? Unless data comes in from a third party, it is quite rare for there to be drastic jumps in the amount of data processed each day. The way to handle such a case is to have the VSAM data set big enough to hold a daily spurt, and then offload / delete / define / reload the data every night if it is required. Using LISTCAT (or EXAMINE) multiple times a day seems like a lot of wasted effort.
_________________
TANSTAAFL

The first rule of code reuse is that the code needs to be worth re-using.

"We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil." -- Donald Knuth

JCL & VSAM :: RE: VSAM File free space

$
0
0
Author: sancraig16
Posted: Wed Apr 04, 2018 7:49 pm (GMT 5.5)

This will be a short term activity for some new projects coming in due to which we are expecting more volume. It will be turned off after few weeks.

Regarding the numbers, are you suggesting that it is not possible to calculate the accurate free space % based on LISTCAT results ?

All Other Mainframe Topics :: RE: converting a mainframe file with ASA CC to word document

$
0
0
Author: sergeyken
Posted: Wed Apr 04, 2018 7:53 pm (GMT 5.5)

There is a new parameter introduced in SYNCSORT supposed to automatically convert the output to standard PDF/RTF/HTML formats:
Code:
 OUTFIL ...,OUTPUT=PDF,...
 OUTFIL ...,OUTPUT=RTF,...
 OUTFIL ...,OUTPUT=HTML,...
This might be useful too, instead of reinventing the wheel.
_________________
Tyrannosaurus-REXX

JCL & VSAM :: RE: VSAM File free space

$
0
0
Author: Robert Sample
Posted: Wed Apr 04, 2018 8:32 pm (GMT 5.5)

LISTCAT gives you accurate free space numbers. HOWEVER, you need to understand that free space is not necessarily the whole picture. Your LISTCAT output shows HI-A-RBA as 1,179,648,000 bytes and free space as 410,521,600 bytes. Subtraction gives 769,126,400 bytes of used space. 751,097 records times 750 bytes is 563,322,750 bytes so there is a difference of 205,803,650 bytes between the amount of used space in this VSAM data set and the number of bytes a sequential data set would require. Some of the difference is in the index component (which you did not provide), but some of the difference will be in the data component. I've seen cases where the data set is 2 to 3 times larger than required because the index CI size was poorly chosen and prevents access to all of the data CI in the CA (note I'm not saying that your data set has this problem but it is a problem I've seen before).
_________________
TANSTAAFL

The first rule of code reuse is that the code needs to be worth re-using.

"We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil." -- Donald Knuth


JCL & VSAM :: RE: VSAM File free space

$
0
0
Author: sancraig16
Posted: Wed Apr 04, 2018 9:00 pm (GMT 5.5)

Thanks for the explanation . Dataset I gave was from TEST . Here are the attributes from production. EXAMINE gives free space as 6% as shown below . I am assuming EXAMINE gives more accurate representation of free space. Is this correct ?

Based on your response even if I SUM up INDEX AND DATA attributes , I still end up with 3.4% free space based on FREESPC and HI-A-RBA numbers below. Is it even possible to account for the remaining 2.6% of free space based on the LISTCAT attributes?

EXAMINE :

Code:


IDC01701I DATATEST BEGINS
IDC01709I DATATEST COMPLETE - NO ERRORS DETECTED
IDC01708I 535992 CONTROL INTERVALS ENCOUNTERED
IDC01710I DATA COMPONENT CONTAINS 8472700 RECORDS
IDC01711I DATA COMPONENT CONTAINS 0 DELETED CONTROL INTERVALS
IDC01712I MAXIMUM LENGTH DATA RECORD CONTAINS 4003 BYTES
IDC01722I 6 PERCENT FREE SPACE
IDC0001I FUNCTION COMPLETED, HIGHEST CONDITION CODE WAS 0



LISTCAT :

DATA :
Code:


ATTRIBUTES
  KEYLEN----------------11     AVGLRECL------------4000
  RKP--------------------0     MAXLRECL------------4000
  STRIPE-COUNT-----------1
  ACT-DIC-TOKEN----X'400000090200054005FE08FE0DFE0EFE0AFE
  SHROPTNS(2,3)      SPEED     UNIQUE           NOERASE
  NONSPANNED    COMP-FORMT     EXTENDED        EXT-ADDR
STATISTICS
  REC-TOTAL--------8472700     SPLITS-CI--------------0
  REC-DELETED------------0     SPLITS-CA--------------0


  REC-INSERTED-----------0     FREESPACE-%CI----------0
  REC-UPDATED------------0     FREESPACE-%CA----------0
  REC-RETRIEVED---90975460     FREESPC--------389283840
  USER-DATA-SIZE----------------------------33890800000
ALLOCATION
  SPACE-TYPE------CYLINDER     HI-A-RBA-----11366400000
  SPACE-PRI-----------3000     HI-U-RBA-----10977669120
  SPACE-SEC-----------3000
VOLUME
  VOLSER------------PRXM36     PHYREC-SIZE--------10240
  DEVTYPE------X'3010200F'     PHYRECS/TRK------------5
  VOLFLAG------------PRIME     TRACKS/CA-------------15
  EXTENTS:
  LOW-CCHH-----X'15370000'     LOW-RBA----------------0
  HIGH-CCHH----X'20EE000E'     HIGH-RBA------2273279999



INDEX :


Code:

ATTRIBUTES
  KEYLEN----------------11     AVGLRECL---------------0
  RKP--------------------0     MAXLRECL-------------505
  SHROPTNS(2,3)   RECOVERY     UNIQUE           NOERASE
  EXT-ADDR
STATISTICS
  REC-TOTAL----------14754     SPLITS-CI--------------0
  REC-DELETED------------0     SPLITS-CA--------------0
  REC-INSERTED-----------0     FREESPACE-%CI----------0
  REC-UPDATED------------0     FREESPACE-%CA----------0
  REC-RETRIEVED----------0     FREESPC----------3505152
ALLOCATION
  SPACE-TYPE------CYLINDER     HI-A-RBA--------11059200
  SPACE-PRI-------------20     HI-U-RBA---------7554048
  SPACE-SEC-------------10
VOLUME
  VOLSER------------PRXM36     PHYREC-SIZE----------512
  DEVTYPE------X'3010200F'     PHYRECS/TRK-----------48
  VOLFLAG------------PRIME     TRACKS/CA--------------1

LOW-CCHH-----X'20EF0000'     LOW-RBA----------------0
HIGH-CCHH----X'2102000E'     HIGH-RBA---------7372799
LOW-CCHH-----X'2CBB0000'     LOW-RBA----------7372800
HIGH-CCHH----X'2CC4000E'     HIGH-RBA--------11059199


DB2 :: RE: How syntax check at Bind time is diff. from Pre-compilation

$
0
0
Author: Poha Eater
Posted: Wed Apr 04, 2018 9:49 pm (GMT 5.5)

Hi Rohit,

Thank you for taking out the time to respond on my query. But i am still in doubt. My understanding is, during Pre-compilation the INCLUDE statement member is copied in the program so when syntax check is performed during pre-compilation, it has column name for reference from DCLGEN and if the column name is not correct then it will give -206.

That is why i had the doubt that if this type of syntax check (wrong column name, bracket is missing, etc) is being done during Pre-compilation then what extra syntax check is happening during Bind time.

Please correct me if i am wrong.


Thank You !
_________________
Thanks !

JCL & VSAM :: RE: VSAM File free space

$
0
0
Author: Robert Sample
Subject: Reply to: VSAM File free space
Posted: Wed Apr 04, 2018 9:59 pm (GMT 5.5)

Yes, EXAMINE is looking at every CI so it will be the most accurate accounting of free space. It is not possible to reconcile the LISTCAT output with the EXAMINE output all the time -- this data set shows why. Even though the AVGLRECL and MAXLRECL are 4,000 (implying a fixed record length), when I divide the HI-U-RBA by the 8,472,700 record count the actual average record length is 1,296 (1295.65 rounded up) and EXAMINE states the longest record is 4,003 bytes. Hence some (maybe all) of the 535,992 CI have unused space in them -- EXAMINE will count this as free space even though LISTCAT will not.
_________________
TANSTAAFL

The first rule of code reuse is that the code needs to be worth re-using.

"We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil." -- Donald Knuth

JCL & VSAM :: RE: VSAM File free space

$
0
0
Author: sancraig16
Posted: Wed Apr 04, 2018 10:58 pm (GMT 5.5)

Are you suggesting that FREESPACE provided by EXAMINE also includes the unused space in each record ? But this space is not usable . Can I say that LISTCAT gives accurate USABLE FREESPACE as compared to EXAMINE ? Ideally I would need the FREESPACE percentage in terms of number of records that I can further insert into the VSAM file . How can i arrive at this number ? Will FREESPC calculation based on (FREESPC /HI-A-RBA ) * 100 be a good representation of actual usable FREE SPACE ?

DB2 :: RE: How syntax check at Bind time is diff. from Pre-compilation

$
0
0
Author: daveporcelan
Posted: Wed Apr 04, 2018 10:58 pm (GMT 5.5)

Just because all the table information is correct with regard to the Include (DCLGEN), it does not mean the table/columns exist IN THE DATABASE.

For example, when a new table or column is added, it is probably only added to the DB2 TEST Subsystem regions. A bind to one of these regions (schemas) would be successful.

If however a bind is attempted to a Quality or Production region, where the changes have yet to be released, the bind would fail.

To summarize, a compile time, the syntax is checked and existence in the dclgen is done.

At bind time, existence in the database is required for a successful bind.

DB2 :: RE: How syntax check at Bind time is diff. from Pre-compilation

$
0
0
Author: Poha Eater
Posted: Wed Apr 04, 2018 11:08 pm (GMT 5.5)

I got the picture now and the difference i was looking for. Thanks a lot Dave & Rohit for clearing out the doubt.

icon_biggrin.gif
_________________
Thanks !

JCL & VSAM :: RE: VSAM File free space

$
0
0
Author: Robert Sample
Posted: Wed Apr 04, 2018 11:55 pm (GMT 5.5)

Did you notice that your LISTCAT indicates free space of 389,283,840 while the difference between HI-A-RBA and HI-U-RBA is 388,730,880? That is a difference of 552,960 bytes more free space -- and I have no idea why the difference (maybe due to the striping?). EXAMINE looks at each CI, so it can determine free space per CI whether or not that free space is usable.

Broadly speaking, AS LONG AS CI AND CA FREE SPACE PERCENTAGES ARE ZERO, you can divide the free space by the average record length (actual, not the LISTCAT value) to know about how many records could be inserted at the end of the KSDS. However, if CI free space or CA free space is not zero, you would have to factor that into your calculation. And this assumes that you do not have a high-values key in the KSDS.

Furthermore, since VSAM handles CI / CA splits automatically, it is entirely possible for a single insert into your KSDS could cause a change in the free space. It is not possible to say your KSDS could accommodate so many more records since the location of the inserted keys would be determining whether or not splits occur.

If you have not read the IBM Redbook VSAM Demystified I strongly recommend you download and read it. It may not answer all of your questions but it would be a good place to start.
_________________
TANSTAAFL

The first rule of code reuse is that the code needs to be worth re-using.

"We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil." -- Donald Knuth


DB2 :: RE: How syntax check at Bind time is diff. from Pre-compilation

$
0
0
Author: Rohit Umarjikar
Posted: Thu Apr 05, 2018 12:01 am (GMT 5.5)

Quote:
so when syntax check is performed during pre-compilation, it has column name for reference from DCLGEN and if the column name is not correct then it will give -206.
No -206 is given at the time of Bind. In DCLGEN column name is for ref. purpose only. You don't need DECLGEN always, you can declare as copybook too instead.
_________________
Regards,
Rohit Umarjikar
A leader is one who knows the way, goes the way, and shows the way.

SYNCSORT :: Reformatting and adding additional filler lines in syncsort

$
0
0
Author: Badbeef
Subject: Reformatting and adding additional filler lines in syncsort
Posted: Thu Apr 05, 2018 4:45 pm (GMT 5.5)

Hi there. Long time lurker first time poster (I think.. its been a while) So lets get to it icon_biggrin.gif

I have two requirements where I need to parse data from a file and then convert it to a different format with additional lines (yes it may be easier with Easytrieve but wondering if I can get away with it using sort).

I would like to show the first one for folks to see what I am going for then show the challenge I am stuck with

INPUT file - one record only
FILETEST101821.txt; otherstuff blah blah blah


My sample sort card - this works
Code:
SORT FIELDS=COPY
OUTFIL OUTREC=(C' SIGNON ESF=YES CASE=YES',80:X,/,
C' SUBMIT PROC=XXXXXXX             -',80:X,/,
C'  &STEP=STEP1                            -',80:X,/,
C'  &FROMDSN=HARD.CODED.FILE1 -',80:X,/,
C'  &TOFILE=',X'7D',C'/hardcoded/directory1/',1,17,
X'7D',80:X,/,                                                           
C' SUBMIT PROC=XXXXXXX                    -',80:X,/,
C'  &STEP=STEP2                           -',80:X,/,
C'  &FROMDSN=HARD.CODED.FILE2        -',80:X,/,
C'  &TOFILE=',X'7D',C'/hardcoded/directory1/CK_',1,17,
X'7D',
C'-',80:X,/,
C' SIGNOFF',80:X)


Note: ---> the X'7D' is ( ' ) in Hexa

Output Results (more or less)
Code:
SIGNON ESF=YES CASE=YES
SUBMIT PROC=XXXXXXX                    -
&STEP=STEP1                           -
&FROMDSN=HARD.CODED.FILE1 -
&TOFILE='/hardcoded/directory1/FILETEST101821.txt'
SUBMIT PROC=XXXXXXX                    -
&STEP=STEP2                           -
&FROMDSN=HARD.CODED.FILE2       -
&TOFILE='/hardcoded/directory1/CK_FILETEST101821.txt'
SIGNOFF


So I am able to just use that one record file and populate the file name in both &TOFILE lines

Challenge

So for the other requirement that I am stuck with:

I need to parse a 4 line record file that contains the source and destination file name for 2 files (the names change but the length of name is fixed) and turn it into the same format as the first challenge.


INPUT FILE2
Code:
PUT 'FILEA.SOURCE.PLACE'  +       
    FILEA.DESTINATION.txt               
PUT 'FILEB.SOURCE.PLACE'  +       
    FILEB.DESTINATION.txt               


Target output

Code:
SIGNON ESF=YES CASE=YES
SUBMIT PROC=XXXXXXX           -
&STEP=STEP1                           -
&FROMDSN=FILEA.SOURCE.PLACE -
&TOFILE='/hardcoded/directory1/FILEA.DESTINATION.txt'
SUBMIT PROC=XXXXXXX                    -
&STEP=STEP2                           -
&FROMDSN=FILEB.SOURCE.PLACE -
&TOFILE='/hardcoded/directory1/FILEB.DESTINATION.txt'
SIGNOFF


So for above I need to put the parsed text in the &FROMDSN and the &TOFILE IS it possible to extract the file names from INPUT FILE 2 and then put it in the format that I need with the additional lines in just one sort step (using multiple OUTREC ??) or do I need to split up into 4 files and then have another sort step do the merge?

Version of syncsort is 2.1.4.0R

Any help would be appreciated icon_smile.gif
_________________
I guard the mattrixx for a living... no really

SYNCSORT :: RE: Reformatting and adding additional filler lines in syncsort

$
0
0
Author: Nic Clouston
Posted: Thu Apr 05, 2018 5:42 pm (GMT 5.5)

Long-time lurker should know to use the code tags and that they are data sets not files!
_________________
Regards
Nic

SYNCSORT :: RE: Reformatting and adding additional filler lines in syncsort

$
0
0
Author: Badbeef
Posted: Thu Apr 05, 2018 6:02 pm (GMT 5.5)

Nic Clouston wrote:
Long-time lurker should know to use the code tags and that they are data sets not files!


sadly as I have not had the chance to post never really got the chance to look at how to do the code tags. Could not find em in the Forum FAQ / User Guide section nor on any sticky. May I ask for a link that explains so please?

As for Datasets and not files, sorry force of habit. I keep talking to a bunch of Datastage/ETL folk over here and their definition of a Dataset is different from ours. Then when I talk to the Java /web folk their eyes glaze over when I say Dataset so I just say File icon_biggrin.gif
_________________
I guard the mattrixx for a living... no really

SYNCSORT :: RE: Reformatting and adding additional filler lines in syncsort

$
0
0
Author: Nic Clouston
Posted: Thu Apr 05, 2018 6:50 pm (GMT 5.5)

Use the full editor - it has buttons to add effects: highlight the text to apply the effect to and click the appropriate button.
_________________
Regards
Nic

Viewing all 8500 articles
Browse latest View live