Tried it on Windows 10 bash shell and got a LOT of 'invalid argument' messages 
on the ln command - but not on all.

Example:

ln: failed to create symbolic link 
‘zOS_V2R2.0_Communications_Server:_IP_Diagnosis_Guide.pdf’: Invalid argument
ln: failed to create symbolic link 
‘zOS_V2R2.0_Communications_Server:_SNA_Messages.pdf’: Invalid argument
ln: failed to create symbolic link 
‘zOS_V2R2.0_Communications_Server:_IP_Messages_Volume_1_(EZA).pdf’: Invalid 
argument
ln: failed to create symbolic link 
‘zOS_V2R2.0_Communications_Server:_IP_Messages_Volume_2_(EZB,_EZD).pdf’: 
Invalid argument


--------------------------------------------------------------------------
Lionel B. Dyck 
Mainframe Systems Programmer - TRA
Enterprise Operations (Station 200) (005OP6.3.10)
Information and Technology, IT Operations and Services

-----Original Message-----
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf 
Of John McKown
Sent: Monday, May 01, 2017 12:12 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: [EXTERNAL] Re: Manual Naming for Local use [WAS: Issue with 
SK4T-4949-13 - IBM Online Library....]

On Mon, May 1, 2017 at 11:48 AM, Paul Gilmartin < 
0000000433f07816-dmarc-requ...@listserv.ua.edu> wrote:

> On Sun, 30 Apr 2017 10:32:50 -0400, Steve Thompson wrote:
> >
> >Example: iea2b6a0.pdf might become iea2b6a0_JCL_REF.pdf
> >
> >This was immediately slapped down as never gonna happen.
> >
> >Should this be put forth as a Share request/requirement?
> >
> 8.3 names should be left in the Dark Ages.  The obstacle might be 
> updating all publications to use document titles in cross references 
> instead of 8.3 names.
>
> >Now, on a Linux system I can create a link to that particular manual 
> >so that it becomes JCL_REF.pdf, but this takes a while to do for each 
> >manual that I'm interested in. But that's me, how many are you 
> >interested in?
> >
> >And if one is a Windows user, can one easily do a link?
> >
> I got fancy.  On MacOS X:
>
> I made no changes to the extracted .zip directory.
>
> Working in a new directory (in the same filesystem):
>
> o I created document titles as *hard* links to the 8.3 pdf files.
>
> o I created 8.3 names as symlinks to those hard links.
>
> Now, with Mac Preview, the document titles appear in window title bars 
> and File; Open Recent shows document titles.
>
> Adobe Reader shows the 83 names.
>
> In both cases, cross-references continue to work.
>
> Except, I used the HLASM General Info as a test because it has a nice 
> Bibliography.  But some links there work; others don't.  For example, 
> the link to the JCL User's Guide works; the link to the JCL Reference 
> doesn't.  The filename appears to be wrong.
> I'll submit an RCF.
>
> -- gil
>

​How I do it on Linux is to use the "pdfinfo" program. Example:

[tsh009@it-johnmckown-linux Documents]$ pdfinfo dz9zr010.pdf
Title:          z/Architecture Principles of Operation
Subject:        z/Architecture
Keywords:
Author:         IBM Corporation
Creator:        FrameMaker 10.0.2
Producer:       Acrobat Distiller 10.1.13 (Windows)
CreationDate:   Thu Feb 19 17:32:41 2015 CST
ModDate:        Thu Feb 19 17:32:41 2015 CST
Tagged:         no
UserProperties: no
Suspects:       no
Form:           AcroForm
JavaScript:     no
Pages:          1732
Encrypted:      no
Page size:      612 x 792 pts (letter)
Page rot:       0
File size:      15180376 bytes
Optimized:      yes
PDF version:    1.6


​So

for i in *.pdf;do ln -s "${i}" $(pdfinfo "${i}" | awk '$1=="Title:" {print 
$0;}' | sed -r 's/^Title: *//;s|/||g;s/ +/_/g;').pdf;done

--
Advertising is a valuable economic factor because it is the cheapest way of 
selling goods, particularly if the goods are worthless. -- Sinclair Lewis


Maranatha! <><
John McKown

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to