[help] i need to extract data from a text file via batch

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Message
Author
Aacini
Expert
Posts: 1927
Joined: 06 Dec 2011 22:15
Location: México City, México
Contact:

Re: [help] i need to extract data from a text file via batch

#31 Post by Aacini » 01 Jun 2012 05:37

Excuse me, I really don't understand all this stuff.

cheeseng wrote:... as i cant attached a files here.. and copy and paste the source data will affect the format...
Why you did not spent a couple minutes reviewing the facilities at this site before post your first question?
cheeseng wrote:.. for the processheader part, how about use this code?
echo User name,User text,Begin menu,Group jobs,End group jobs,Command ^ ine on menus,Attention-key program,Reference user, Group I, Group I Description,Group II, Group II Description,Group III, Group III Description, Group IV, Group IV Description,Group V, Group V Description,Group VI, Group VI Description>outputfile.csv

If refer to the first print-screen (1) that is the most basic output...

foxidrive wrote:... and I have no idea how screenshots are going to help in testing code...
(yes, I think the same...)

You mean I am obliged to see that picture, otherwise I won't understand what your are talking about? Can't you explain here in a couple lines what the difference is?
cheeseng wrote:... I will definitely be more careful in the future post ...
Really?
cheeseng wrote:... i am not aware such thing will trouble u guys so much..

I don't understand why you don't see that the minimum modification of the data lead to a modification in the program; this is true for any programming language and in general for any application. Do you think that is the same to enter a space that not do it? Is this your first contact with computers?

For instance, in the first example source file you included here with the tag code you added empty lines. Processing empty lines is particularly difficult in a Batch file, so I had to insert code to manage that case. However, the real source file (input2.txt, it is really that?) have NOT empty lines! Developing a Batch program like this one is not an easy task, so is very disappointing that many of my efforts were completely useless because details like this one (and the list is long!). I really feel that I have wasted my time trying to solve this problem.
cheeseng wrote:i have provided the input and desired output files to dropbox...
Again and again... I have not Excell! It wouldn't be easier that you identify the changes in the posted text vs. the original data and describe they in a couple lines?
cheeseng wrote:For the output in csv format can ignore rc code review1 review2 and remark.
Of course, I don't know what your are talking about (I have not Excell). Can't you explain here in a couple lines the difference?
cheeseng wrote:I didn't aware that you will use the datai put in the post... in case u wondering what i am talking about.. (Kindly don't use this, as this is for illustration purpose only...)

I REALLY don't understand what the purpose is to post example data that is not the real data: "... don't use this, as this is for illustration purpose only"? Illustration purpose only??? What do you think this forum is for???? Couldn't you spend 5 minutes describing how to recover the real data from the posted text? Couldn't you post in the other site a small example data file from the very beginning?
cheeseng wrote:However, this time would you like to use source file i put in dropbox.

You act like if we all were your employees! (where is my money?)
cheeseng wrote:... the code work 98%
Really? Are you sure it is not 97% nor 99%? It wouldn't be easier if you just describe what exactly happened in a couple lines?
cheeseng wrote:... i am now working on try to filter off the content to reach what @Aacini has offered previously..

i am thinking to work in 2 step.. first with the raw data > filter off > become the input what Aacini has done > then run the code > output.

i try to use findstr /B "content"

Code: Select all

type %1 | findstr /B " ****  " | findstr /B "Begin menu" | findstr /B "Group jobs" | findstr /B "End group jobs" | findstr /B "Command line on menus" | findstr /B "Reference user"> output.txt

but doesn't work..
any guide :)?
Of course, I have absolutely no idea what you are talking about, but I suppose you are trying to fix the 2% bad part of my program. It is (still) funny to me that you wrote this: "the raw data > filter off > become the input" and did not realize that what you called "filter off" was the posting of the data in this forum. This way, to fix this problem you should identify HOW the original data is modified when is posted in this site and then ask: "How I should modify the program to manage this modification in the data?".

I had fixed the program to get the expected output when processing input2.txt as source file (is it the real data format? perhaps we never know...). This is the result of the first 6 output records:

Code: Select all

UserName,User Text,Begin Menu,Group Jobs,End Group Jobs,Command Line on Menus,Attention-Key Program,Reference user,Group I,Group I Description,Group II,Group II Description,Group III,Group III Description,Group IV,Group IV Description,Group V,Group V Description,Group VI,Group VI Description
ABAX,Beatrice Raffaele,*NONE, 15,*NO,*NO,*ACTIVE,OPERATOR
ABCG,Barchiesi Giancarlo,*NONE, 15,*NO,*NO,*ACTIVE,OPERATOR
ABEF,Fabio Besomi - IBM System Engineer,*NONE, 15,*NO,*NO,*ACTIVE,OPERATOR
ABTQ,GIULIA BERTON,*NONE, 15,*NO,*NO,*ACTIVE,OPERATOR
ACAG,Cavalli Graziano,*NONE, 15,*NO,*NO,*ACTIVE,OPERATOR
ACEA,Carretta Mauro,*NONE, 15,*NO,*NO,*ACTIVE,OPERATOR

However, for illustration purposes only, I will not post the new version here. The modification to the program is really simple; you just need to change 1 (one) character to get the desired output! So this time I will let you to discover by yourself what the required modification is. Just remember what I said above about the change of the real data when you post it here. (Perhaps if you explain that change, someone could find the required modification for you.)

In my version I also deleted the part that process empty lines (the program will run somewhat faster without them) and include a counter that is displayed in the screen for every record processed (because the whole process takes too long...).

An additional modification (a While loop) may speed up the program via a much faster processing of the large blocks of unrelated data ("*REFUSER" lines).

Regards...

Antonio

foxidrive
Expert
Posts: 6031
Joined: 10 Feb 2012 02:20

Re: [help] i need to extract data from a text file via batch

#32 Post by foxidrive » 01 Jun 2012 06:18

It has been very frustrating Aacini - you've put a lot of work into it and the goal posts kept moving.
The OP has no idea that we need an unmodified input file to give correct results - but he has provided one in the end.

If you still want to try this then I wrote a small snippet that provides a simpler input file here: viewtopic.php?p=16755#p16755

The input file is Unicode and there is a link to it there too.

Aacini
Expert
Posts: 1927
Joined: 06 Dec 2011 22:15
Location: México City, México
Contact:

Re: [help] i need to extract data from a text file via batch

#33 Post by Aacini » 02 Jun 2012 15:46

Thanks a lot, foxidrive. Yes, you are right: I had invested too much time in this matter, so I shouldn't stop now. I taken up again this problem and it is now completely solved. These are the details:

The original Unicode file must be manually converted to Ascii using a type command just once:

Code: Select all

type new_input.txt > input.txt

I modified the method to search for "User information" lines. Previously I used an IF comparison line by line in a loop assembled with GOTO. In the new version I changed that by a FINDSTR /N command to locate such lines and a FOR /L ... SET /P to quickly skip from the last processed line to the first line of a new user; this modification dramatically improve the program speed. The new version takes 13 seconds to process the 10 MB input file in my old&slow machine. The new program also display in the screen the user names processed; this is the result:

Code: Select all

ABAX, ABCG, ABEF, ABTQ, ACAG, ACEA, ACHNG, ACMV, AGIE, AGNESG, AGNESP, AHCHOO, A
JOA, AJOEY, ALLUSR, AMAI, AMAU, AMOS, AONG, AORF, APSE, ASAS, ASHLEY, ATOP, AVIO
, AZAL, AZAMAN, BACMETER, BTAN, BYONG, CALWANI, CHCHAN, CHIPAD, CHTAN, CLCHIN, C
LNG, CMIRWA, CSCHIN, CTTAN, CYONG, DACHOW, DARYLLA, DCHAN, DCHOW, DWYE, ECHEAH,
EDPEREZ, EELKE, ELOH, ENCHUA, EVCHEE, GALAU, GKOH, GRPADM, GRPAUD, GRPBACMTR, GR
PBDMC, GRPBOCDA, GRPBOCDI, GRPBOPAV1, GRPBOPA1, GRPBOPA2, GRPBOPA3, GRPBOPI1, GR
PBOPI2, GRPBOPI3, GRPBOPOC, GRPBOPOC1, GRPBOSECA, GRPBOSECA1, GRPBOSECI, GRPBOSE
CI1, GRPBOSECU, GRPCREAV, GRPCREE, GRPCREECA, GRPCREERC, GRPCREI, GRPCREIA, GRPC
REIAV, GRPDEASEC, GRPDEASECC, GRPIEP, GRPINQ1, GRPINVADV, GRPLEGCOMP, GRPMIS, GR
PMKTEQ, GRPMKTFO, GRPMKTFON, GRPNGM, GRPNGMBOA1, GRPNGMBOI1, GRPNGMMKT, GRPNRI,
GRPPGMOFF, GRPREGFINA, GRPREGFINI, GRPRPCOP, GRPRPCOPSL, GRPRSCO, GRPRSOP, GRPRS
PJ, GRPSECINFA, GRPSECINFI, GRPSECINFM, GRPTRARISK, GRPTREDEA, GRPTREGTP, HHMULI
, HKAUCB, HKAUKI, HKCHAA, HKCHAK, HKCHAP, HKCHBR, HKCHCM, HKCHCR, HKCHDQ, HKCHEC
, HKCHER, HKCHFD, HKCHFX, HKCHIC, HKCHJA, HKCHJE, HKCHLO, HKELIC, HKFANJ, HKFONG
, HKHAWU, HKHOAL, HKHOHY, HKHSUA, HKHSUK, HKHUSY, HKIPED, HKIPSV, HKKWNA, HKKWOE
, HKLAIB, HKLAIM, HKLAJB, HKLAJI, HKLAMW, HKLAMX, HKLAMY, HKLASH, HKLAUN, HKLAVA
, HKLAVB, HKLAWF, HKLAWH, HKLEEK, HKLEFT, HKLEGD, HKLEGH, HKLENH, HKLEPL, HKLEUO
, HKLIMV, HKLIST, HKLIUE, HKLUGA, HKLUKR, HKMANT, HKMCCH, HKMOKG, HKNGAN, HKNICH
, HKPONS, HKPURG, HKSHSY, HKSUNG, HKSUSU, HKTSAL, HKTSYY, HKTWAN, HKVARI, HKWOGI
, HKWONE, HKWONI, HKWONM, HKWONP, HKWOOJ, HKWOOT, HKWUAN, HKYAKY, HKYENK, HKYEUA
, HKYUEL, HKYUSW, HMCTEST1, HSLEONG, HXNG, JACQTAN, JALIM, JASLEE, JASONNG, JENN
IEH, JENNYTAN, JERNG, JHLAM, JINGHUI, JKEE, JOSOO, JOTALIG, JTONG, JULIMA, JYHAN
G, JYTAN, KCHIN, KCKIANG, KKOH, KYEUNG, LEEJ, LGOH, LHAN, LIJING, LINCOLN, LLEUN
G, LLTAY, LSHOON, LTGOH, LWTAY, MANOJ, MARKO, MCHOO, MELVINT, MHLOH, MKWONG, MPI
NG, MRIDZ, NGMY, NLVONN, NORLINS, NURAR, OLWOO, OPERATOR, PLAI, PLTER, PMLEE, PS
NG, PWONG, QMYEE, QSYSOPR, SAMSIDAH, SCHING, SEC_SG_1, SGAFON, SGAHUANG, SGAKMA,
 SGALSN, SGANGCH, SGANJO, SGASAR, SGBATS, SGBOES, SGCHAJ, SGCHGQ, SGCHKC, SGCHSC
, SGCHUS, SGCHUY, SGCHVN, SGCHWA, SGDAVS, SGDEPW, SGDTEO, SGDVO, SGERXR, SGFARS,
 SGFEIJ, SGFIFM, SGGANJO, SGGEGP, SGGLSY, SGGOHN, SGGOIO, SGGOJI, SGGUGL, SGHARI
, SGHEAH, SGHENC, SGHIUA, SGHOEM, SGHOYE, SGHUSJU, SGHUSN, SGJANT, SGKAIA, SGKAN
T, SGKENS, SGKOAS, SGKOHH, SGKOHO, SGKOHV, SGKOIR, SGKOLY, SGKOMT, SGKONM, SGKQU
EK, SGLASK, SGLEED, SGLEEI, SGLEFH, SGLEFO, SGLEMO, SGLEOJDY, SGLIAL, SGLILH, SG
LILI, SGLIMM, SGLIPH, SGLIWJ, SGLOOT, SGLOWEE, SGLOWV, SGLOXA, SGLUMT, SGLUOY, S
GLYEZ, SGMARD, SGMARI, SGMETV, SGMMLI, SGMONW, SGMOTY, SGNGCI, SGNGMG, SGNGSU, S
GOHAM, SGOHRO, SGOLIM, SGOTKW, SGPAYP, SGPOOJ, SGPOSP, SGPRAF, SGRAML, SGRANN, S
GSEEG, SGSENL, SGSETM, SGSODR, SGSOHC, SGSOHY, SGSOOA, SGSOSS, SGSUPM, SGTAAS, S
GTACL, SGTAKO, SGTANI, SGTANM, SGTANQ, SGTANS, SGTANV, SGTAQU, SGTAQX, SGTASW, S
GTEED, SGTEEJ, SGTEOB, SGTKAR, SGTOKC, SGTOLC, SGTRIL, SGTTER, SGUNGM, SGWAHJ, S
GWCLIM, SGWOUS, SGWUGR, SGWUTH, SGYECY, SGYEJO, SGYEJY, SGZHUW, SGZTHAM, SGZWGO,
 SHCHON, SIMLI, SINELEC, SKCHIA, SLANG, SNEO, SNGO, SONG, SSLTAN, SYAN, TANG, TT
ANIA, TWSHAN, TYHAO, VCHAN, VENUS, WCHUA, WMNG, WTSU, YAPK, YWCHO, YYLIM, YYWAI,
 ZLQIN, ZQTAN, ZYCHEN, ZYING,

Here are some selected segments of the resulting output file:

Code: Select all

UserName,User Text,Begin Menu,Group Jobs,End Group Jobs,Command Line on Menus,Attention-Key Program,Reference user,Group I,Group I Description,Group II,Group II Description,Group III,Group III Description,Group IV,Group IV Description,Group V,Group V Description,Group VI,Group VI Description
ABAX,Beatrice Raffaele,*NONE, 15,*NO,*NO,*ACTIVE,OPERATOR
ABCG,Barchiesi Giancarlo,*NONE, 15,*NO,*NO,*ACTIVE,OPERATOR
ABEF,Fabio Besomi - IBM System Engineer,*NONE, 15,*NO,*NO,*ACTIVE,OPERATOR

BYONG,ONG BEE YUEN,MAIN, 15,*NO,*NO,*ACTIVE,*MULTIPLE,GRPBOPAV1,Back Off. Processing,GRPBOPA3,Back Off. Processing,GRPBOPI1,Back Off. Processing
CALWANI,CHRIS ALWANI,MAIN, 15,*NO,*NO,*ACTIVE,*MULTIPLE,GRPBOPAV1,Back Off. Processing,GRPBOPA1,Back Off. Processing,GRPBOPA3,Back Off. Processing,GRPBOPI2,Back Off. Processing
CHCHAN,CHAN CHOON HUA,MAIN, 15,*NO,*NO,*ACTIVE,*MULTIPLE,GRPBOPOC1,Back Office Ops Ctrl(no Mirage)
CHIPAD,CHITTARANJAN PADHEE,MAIN, 15,*NO,*NO,*ACTIVE,*MULTIPLE,GRPMIS,MIS Dept

GKOH,GINA KOH SZER HWEE,MAIN, 15,*NO,*NO,*ACTIVE,*MULTIPLE,GRPBOSECA1,Securities Admin w/o 7 & 10,GRPBOSECI1,Securities Admin w/o 7 & 10,GRPBOSECU,Securities Admin
GRPADM,Administration,MAIN, 15,*NO,*NO,*ACTIVE,*NONE


Antonio

cheeseng
Posts: 19
Joined: 30 May 2012 03:36

Re: [help] i need to extract data from a text file via batch

#34 Post by cheeseng » 03 Jun 2012 20:58

Thanks Aacini and Foxidrive,

really appreciate your help!!
Yes, i am new to window scripting,I also knew that you have put in so much of effort..
So, i am trying to understand Aacini work to try to modify the require change..
However, would you able to enlighten me some of the code you wrote.
It will be very helpful for me :)
For example, !line:~23,16!" >> is it refer to the line it start to read?

really thank you for not giving up the work..

Aacini
Expert
Posts: 1927
Joined: 06 Dec 2011 22:15
Location: México City, México
Contact:

Re: [help] i need to extract data from a text file via batch

#35 Post by Aacini » 03 Jun 2012 22:35

I criticize the way you requested for a solution and the bad quality of the data you provide. I want not force you to learn Batch in a couple days; however, in my opinion you had not made an effort enough to get the solution.

My request is very simple: just explain in your own words what is the difference between the data that I or anyone can copy from this site (taken from your posts) and the real data that will be used in the Batch program. Then explain in your own words how the Batch program should be modified to correctly process the real data. That is it!

Antonio

cheeseng
Posts: 19
Joined: 30 May 2012 03:36

Re: [help] i need to extract data from a text file via batch

#36 Post by cheeseng » 04 Jun 2012 00:29

This is to clarify for those who will use this as a reference for batch file processing..

The input data i provided in earlier post might be inaccurate(i didn't include option number and option text column) for the actual batch file processing, hence i would like to explain in detail what the input look like with example

input file (this is not the full data, to access please download from here http://dl.dropbox.com/u/6621198/new_input.txt )

Code: Select all

 (C) SRC Secure Solutions bv                     iMenu400 Authorised Options for User         28/05/12  15:39:36       Page     10
 =====================================================================================================================================
               *                                                                                                       *
 * * * * * * * * *      User information  . . . . . : User name . . . . . . . . . : ABTQ                             * * * * * * * * *
               *                                      User text . . . . . . . . . : GIULIA BERTON                      *
                                                      Begin menu  . . . . . . . . : *NONE
                                                      Group jobs  . . . . . . . . :  15
                                                      End group jobs  . . . . . . : *NO
                                                      Command line on menus . . . : *NO
                                                      Attention-key program . . . : *ACTIVE
                                                      Reference user  . . . . . . : OPERATOR
 =====================================================================================================================================
 Menu information:      Menu  . . . . . . . . . . . : ITOP
                        Menu text . . . . . . . . . : ITOP menu for the IBM operators
                        User authority  . . . . . . : *REFUSER
                        Reference user authority  . : *USE
 Option   Option                                           User          Ref.user      Group               Date      Time      Number
 number   text                                             authority     authority     job      Activated  used      used     acesses
 _____________________________________________________________________________________________________________________________________
    1     Job Schedul. BOD 06am EOD:20pm                   *REFUSER      *USE          *NO     *YES
    9     WRKJOBJS                                         *REFUSER      *USE          *NO     *YES        18/05/12  21:42:20     150
   10     Work with Job Scheduler (BOD)                    *REFUSER      *USE          *NO     *YES        18/05/12  21:12:03     139
   11     Work with Job Scheduler (EOD)                    *REFUSER      *USE          *NO     *YES        18/05/12  21:45:42     195
   12     Check JS History                                 *REFUSER      *USE          *NO     *YES
   13     WRKJOBSCDE                                       *REFUSER      *USE          *NO     *YES
   15     Save and Restore                                 *REFUSER      *USE          *NO     *YES
   20     Save Objects       (SAVOBJ)                      *REFUSER      *USE          *NO     *YES
   21     Restore Object     (RSTOBJ)                      *REFUSER      *USE          *NO     *YES
   22     Save Library       (SAVLIB)                      *REFUSER      *USE          *NO     *YES
   23     Restore Library    (RSTLIB)                      *REFUSER      *USE          *NO     *YES
   24     Save restore obj   (SAVRSTOBJ)                   *REFUSER      *USE          *NO     *YES
   25                                                      *REFUSER      *USE          *NO     *YES
   27     Work with commands                               *REFUSER      *USE          *NO     *YES
   28     Work with BRMS     (WRKMEDIBRM                   *REFUSER      *USE          *NO     *YES
   29     Work with object   (WRKOBJ)                      *REFUSER      *USE          *NO     *YES         1/12/11   2:57:01       7
   30     Active Jobs        (WRKACTJOB)                   *REFUSER      *USE          *NO     *YES        19/05/12     52:45     254
   31     MQSeries           (WRKMQM)                      *REFUSER      *USE          *NO     *YES        20/05/11  21:06:25       3
   32     Configurat.status  (WRKCFGSTS)                   *REFUSER      *USE          *NO     *YES
   33     Submitted Jobs     (WRKSBMJOB)                   *REFUSER      *USE          *NO     *YES
   34     Object Locks       (WRKOBJLCK)                   *REFUSER      *USE          *NO     *YES         1/12/11   4:04:50      11
   35     Work with Job      (WRKJOB)                      *REFUSER      *USE          *NO     *YES        28/02/12  20:44:39       2
   36     Work with Writers  (WRKWTR)                      *REFUSER      *USE          *NO     *YES        28/02/12  20:42:48       1
   37     Output Queues      (WRKOUTQ)                     *REFUSER      *USE          *NO     *YES        29/02/12  21:10:34       2
   38     Spool Files        (WRKSPLF)                     *REFUSER      *USE          *NO     *YES        28/02/12  20:53:48       3
   39                                                      *REFUSER      *USE          *NO     *YES
   40     Device Description (WRKDEVD)                     *REFUSER      *USE          *NO     *YES
   41     Work with Libraries(WRKLIB)                      *REFUSER      *USE          *NO     *YES
   42     With Subsystems    (WRKSBS)                      *REFUSER      *USE          *NO     *YES         3/04/11  20:38:59       4
 (C) SRC Secure Solutions bv                     iMenu400 Authorised Options for User         28/05/12  15:39:36       Page     11
 =====================================================================================================================================
 Option   Option                                           User          Ref.user      Group               Date      Time      Number
 number   text                                             authority     authority     job      Activated  used      used     acesses
 _____________________________________________________________________________________________________________________________________
   43     System Activity    (WRKSYSACT)                   *REFUSER      *USE          *NO     *YES        19/05/11  23:03:22       1
   44     System Status      (WRKSYSSTS)                   *REFUSER      *USE          *NO     *YES         3/04/11  20:58:13       1
   45     User Jobs          (WRKUSRJOB)                   *REFUSER      *USE          *NO     *YES
   46     WORK Subsystem Jobs(WRKSBSJOB)                   *REFUSER      *USE          *NO     *YES
   47     User Profiles      (DSPUSRPRF)                   *REFUSER      *USE          *NO     *YES        29/04/11   6:56:05       8
   48     Media using BRM    (WRKMEDBRM)                   *REFUSER      *USE          *NO     *YES
   49     Work with Job Queue(WRKJOBQ)                     *REFUSER      *USE          *NO     *YES
   50     DISPLAY                                          *REFUSER      *USE          *NO     *YES
   51     Display Message Qu.(DSPMSG)                      *REFUSER      *USE          *NO     *YES
   52                                                      *REFUSER      *USE          *NO     *YES
   53     Work with Sys.Value(WRKSYSVAL)                   *REFUSER      *USE          *NO     *YES
   54     Display Data Area  (DSPDTAARA)                   *REFUSER      *USE          *NO     *YES
   55     Display Job Log    (DSPJOBLOG)                   *REFUSER      *USE          *NO     *YES
   56     Display Log        (DSPLOG)                      *REFUSER      *USE          *NO     *YES        28/02/12  20:53:01       5
   57     Display Library    (DSPLIB)                      *REFUSER      *USE          *NO     *YES
   58     Display Program    (DSPPGM)                      *REFUSER      *USE          *NO     *YES
   59     Start Backup  BRM  (STRBKUBRM)                   *REFUSER      *USE          *NO     *YES
   60     Change Data Area   (CHGDTAARA)                   *REFUSER      *USE          *NO     *YES
   61     Open/Close Subsystem                             *REFUSER      *USE          *NO     *YES
   62     Start Subsystem    (STRSBS)                      *REFUSER      *USE          *NO     *YES        17/09/11   7:35:03      11
   63     End Subsystem      (ENDSBS)                      *REFUSER      *USE          *NO     *YES
   64                                                      *REFUSER      *USE          *NO     *YES
   65                                                      *REFUSER      *USE          *NO     *YES
   69     Operations on Libraries                          *REFUSER      *USE          *NO     *YES
   70     Create Library     (CRTLIB)                      *REFUSER      *USE          *NO     *YES
   71     Edit Library List  (EDTLIBL)                     *REFUSER      *USE          *NO     *YES
   72     Add Library List   (ADDLIBLE)                    *REFUSER      *USE          *NO     *YES
   73     Change Library List(CHGLIBL)                     *REFUSER      *USE          *NO     *YES
   74     Transfer to Olympic(OLY PR N)                    *REFUSER      *USE          *NO     *YES
   79     MESSAGES                                         *REFUSER      *USE          *NO     *YES
   80     Send Break Message (SNDBRKMSG)                   *REFUSER      *USE          *NO     *YES
   81     Send Message       (SNDMSG)                      *REFUSER      *USE          *NO     *YES
   84     Daily Save on Lugano BRMS                        *REFUSER      *USE          *NO     *YES
   85     Operations with BRMS                             *REFUSER      *USE          *NO     *YES        19/05/12     52:28      71
   88     DSPLOGBRM                                        *REFUSER      *USE          *NO     *YES        19/05/12     52:14     139
   90     Work with Media Library Status                   *REFUSER      *USE          *NO     *YES         6/04/11      6:06       5
   95     GO BRMS                                          *REFUSER      *USE          *NO     *YES        14/05/12  23:44:03       5
   99     Operation with SAVE FILE                         *REFUSER      *USE          *NO     *YES
  100     Display Save file  (DSPSAVF)                     *REFUSER      *USE          *NO     *YES
  101     Create Save File   (CRTSAVF)                     *REFUSER      *USE          *NO     *YES
  102     Clear Save File    (CLRSAVF)                     *REFUSER      *USE          *NO     *YES
  109     Other Commands                                   *REFUSER      *USE          *NO     *YES
  110     Start PDM          (STRPDM)                      *REFUSER      *USE          *NO     *YES
  111     Retrieve CLP (RTVCLSRC)                          *REFUSER      *USE          *NO     *YES
  114     Initalize DIFSBS                                 *REFUSER      *USE          *NO     *YES
  115     Take QSYSOPR Msgq in Break                       *REFUSER      *USE          *NO     *YES
  116     Runqry *N operator/triggers                      *REFUSER      *USE          *NO     *YES
 (C) SRC Secure Solutions bv                     iMenu400 Authorised Options for User         28/05/12  15:39:36       Page     12
 =====================================================================================================================================
 Option   Option                                           User          Ref.user      Group               Date      Time      Number
 number   text                                             authority     authority     job      Activated  used      used     acesses
 _____________________________________________________________________________________________________________________________________
  117     Submit Job         (SBMJOB)                      *REFUSER      *USE          *NO     *YES        29/04/11   7:04:56       5
  118     TCP/IP Connection Status                         *REFUSER      *USE          *NO     *YES
  119                                                      *REFUSER      *USE          *NO     *YES
  120     GO EEPADM                                        *REFUSER      *USE          *NO     *YES         2/12/11   4:37:11       1
  121     Menu Backup(Use with caution)                    *REFUSER      *USE          *NO     *YES
  122     Full Backup of end of month                      *REFUSER      *USE          *NO     *YES
  123     Copy Spooled File (CPYSPLF)                      *REFUSER      *USE          *NO     *YES
  124                                                      *REFUSER      *USE          *NO     *YES
  125     Request Emergency Password EEP                   *REFUSER      *USE          *NO     *YES        22/08/11  19:47:42       4
  126     Change Password                                  *REFUSER      *USE          *NO     *YES        22/08/11  19:46:44       4
  127     Start TCP server                                 *REFUSER      *USE          *NO     *YES
  128     Work with TCP/IP Network Stat                    *REFUSER      *USE          *NO     *YES        18/05/12  21:34:47       2
  129     Call Mirage                                      *REFUSER      *USE          *NO     *YES        22/05/12   5:38:04      65
  130     Generation PDF Olyweb SGPOLY                     *REFUSER      *USE          *NO     *YES        22/05/12   6:12:29      65
  135                                                      *REFUSER      *USE          *NO     *YES
  140     Send Spool Files (SNDTCPSPLF)                    *REFUSER      *USE          *NO     *YES
  141     Create File (CRTPF)                              *REFUSER      *USE          *NO     *YES
  142     IPMON Monitoring                                 *REFUSER      *USE          *NO     *YES        18/05/12  21:43:05       2
  143                                                      *REFUSER      *USE          *NO     *YES
  145     Monthly maintenance BRMS                         *REFUSER      *USE          *NO     *YES         3/04/11  23:33:07       1
  146                                                      *REFUSER      *USE          *NO     *YES
  150     PM Spool  (PMSPO)                                *REFUSER      *USE          *NO     *YES
  152     WRKSPL                                           *REFUSER      *USE          *NO     *YES
  155                                                      *REFUSER      *USE          *NO     *YES
  160     Start HTTP server                                *REFUSER      *USE          *NO     *YES        15/09/11   5:07:52       1
  165                                                      *REFUSER      *USE          *NO     *YES
  170     WRKLNK                                           *REFUSER      *USE          *NO     *YES        22/05/12   6:10:39      74
  180     WRKAUTL                                          *REFUSER      *USE          *NO     *YES
  185     WRKPRB                                           *REFUSER      *USE          *NO     *YES
  195     Missing Subsystems (DIFSBS)                      *REFUSER      *USE          *NO     *YES
  200     Create Directory   (CRTDIR)                      *REFUSER      *USE          *NO     *YES
  202                                                      *REFUSER      *USE          *NO     *YES
  205     Check the Bloomberg file.                        *REFUSER      *USE          *NO     *YES
  207                                                      *REFUSER      *USE          *NO     *YES
  210     WRKSIT                                           *REFUSER      *USE          *NO     *YES
  220                                                      *REFUSER      *USE          *NO     *YES
  300                                                      *REFUSER      *USE          *NO     *YES
  333     TRANSFER TO @SYSTEMOPR                           *REFUSER      *USE          *NO     *YES
  400                                                      *REFUSER      *USE          *NO     *YES
  950     PWRDWNSYS                                        *REFUSER      *USE          *NO     *YES
  960                                                      *REFUSER      *USE          *NO     *YES
  999     SIGNOFF                                          *REFUSER      *USE          *NO     *YES
 (C) SRC Secure Solutions bv                     iMenu400 Authorised Options for User         28/05/12  15:39:36       Page     13
 =====================================================================================================================================
               *                                                                                                       *
 * * * * * * * * *      User information  . . . . . : User name . . . . . . . . . : ACAG                             * * * * * * * * *
               *                                      User text . . . . . . . . . : Cavalli Graziano                   *
                                                      Begin menu  . . . . . . . . : *NONE
                                                      Group jobs  . . . . . . . . :  15
                                                      End group jobs  . . . . . . : *NO
                                                      Command line on menus . . . : *NO
                                                      Attention-key program . . . : *ACTIVE
                                                      Reference user  . . . . . . : OPERATOR
 =====================================================================================================================================
 Menu information:      Menu  . . . . . . . . . . . : ITOP
                        Menu text . . . . . . . . . : ITOP menu for the IBM operators
                        User authority  . . . . . . : *REFUSER
                        Reference user authority  . : *USE
 Option   Option                                           User          Ref.user      Group               Date      Time      Number
 number   text                                             authority     authority     job      Activated  used      used     acesses
 _____________________________________________________________________________________________________________________________________
    1     Job Schedul. BOD 06am EOD:20pm                   *REFUSER      *USE          *NO     *YES
    9     WRKJOBJS                                         *REFUSER      *USE          *NO     *YES        13/03/12  23:22:37       5
   10     Work with Job Scheduler (BOD)                    *REFUSER      *USE          *NO     *YES         2/06/11   4:19:06       1
   11     Work with Job Scheduler (EOD)                    *REFUSER      *USE          *NO     *YES        24/04/12  22:07:27      25
   12     Check JS History                                 *REFUSER      *USE          *NO     *YES        16/01/12  22:39:08       1
   13     WRKJOBSCDE                                       *REFUSER      *USE          *NO     *YES
   15     Save and Restore                                 *REFUSER      *USE          *NO     *YES
   20     Save Objects       (SAVOBJ)                      *REFUSER      *USE          *NO     *YES
   21     Restore Object     (RSTOBJ)                      *REFUSER      *USE          *NO     *YES
   22     Save Library       (SAVLIB)                      *REFUSER      *USE          *NO     *YES
   23     Restore Library    (RSTLIB)                      *REFUSER      *USE          *NO     *YES
   24     Save restore obj   (SAVRSTOBJ)                   *REFUSER      *USE          *NO     *YES
   25                                                      *REFUSER      *USE          *NO     *YES
   27     Work with commands                               *REFUSER      *USE          *NO     *YES
   28     Work with BRMS     (WRKMEDIBRM                   *REFUSER      *USE          *NO     *YES
   29     Work with object   (WRKOBJ)                      *REFUSER      *USE          *NO     *YES
   30     Active Jobs        (WRKACTJOB)                   *REFUSER      *USE          *NO     *YES        16/05/12   4:13:16      74
   31     MQSeries           (WRKMQM)                      *REFUSER      *USE          *NO     *YES
   32     Configurat.status  (WRKCFGSTS)                   *REFUSER      *USE          *NO     *YES
   33     Submitted Jobs     (WRKSBMJOB)                   *REFUSER      *USE          *NO     *YES
   34     Object Locks       (WRKOBJLCK)                   *REFUSER      *USE          *NO     *YES
   35     Work with Job      (WRKJOB)                      *REFUSER      *USE          *NO     *YES
   36     Work with Writers  (WRKWTR)                      *REFUSER      *USE          *NO     *YES        29/10/11  17:35:30       2
   37     Output Queues      (WRKOUTQ)                     *REFUSER      *USE          *NO     *YES
   38     Spool Files        (WRKSPLF)                     *REFUSER      *USE          *NO     *YES
   39                                                      *REFUSER      *USE          *NO     *YES
   40     Device Description (WRKDEVD)                     *REFUSER      *USE          *NO     *YES
   41     Work with Libraries(WRKLIB)                      *REFUSER      *USE          *NO     *YES
   42     With Subsystems    (WRKSBS)                      *REFUSER      *USE          *NO     *YES
 (C) SRC Secure Solutions bv                     iMenu400 Authorised Options for User         28/05/12  15:39:36       Page     14
 =====================================================================================================================================
 Option   Option                                           User          Ref.user      Group               Date      Time      Number
 number   text                                             authority     authority     job      Activated  used      used     acesses
 _____________________________________________________________________________________________________________________________________
   43     System Activity    (WRKSYSACT)                   *REFUSER      *USE          *NO     *YES
   44     System Status      (WRKSYSSTS)                   *REFUSER      *USE          *NO     *YES
   45     User Jobs          (WRKUSRJOB)                   *REFUSER      *USE          *NO     *YES
   46     WORK Subsystem Jobs(WRKSBSJOB)                   *REFUSER      *USE          *NO     *YES
   47     User Profiles      (DSPUSRPRF)                   *REFUSER      *USE          *NO     *YES
   48     Media using BRM    (WRKMEDBRM)                   *REFUSER      *USE          *NO     *YES
   49     Work with Job Queue(WRKJOBQ)                     *REFUSER      *USE          *NO     *YES
   50     DISPLAY                                          *REFUSER      *USE          *NO     *YES
   51     Display Message Qu.(DSPMSG)                      *REFUSER      *USE          *NO     *YES        13/03/12      3:44      13
   52                                                      *REFUSER      *USE          *NO     *YES
   53     Work with Sys.Value(WRKSYSVAL)                   *REFUSER      *USE          *NO     *YES
   54     Display Data Area  (DSPDTAARA)                   *REFUSER      *USE          *NO     *YES
   55     Display Job Log    (DSPJOBLOG)                   *REFUSER      *USE          *NO     *YES         2/09/11  21:54:51       1
   56     Display Log        (DSPLOG)                      *REFUSER      *USE          *NO     *YES         2/09/11  21:54:41       1
   57     Display Library    (DSPLIB)                      *REFUSER      *USE          *NO     *YES
   58     Display Program    (DSPPGM)                      *REFUSER      *USE          *NO     *YES
   59     Start Backup  BRM  (STRBKUBRM)                   *REFUSER      *USE          *NO     *YES
   60     Change Data Area   (CHGDTAARA)                   *REFUSER      *USE          *NO     *YES
   61     Open/Close Subsystem                             *REFUSER      *USE          *NO     *YES
   62     Start Subsystem    (STRSBS)                      *REFUSER      *USE          *NO     *YES
   63     End Subsystem      (ENDSBS)                      *REFUSER      *USE          *NO     *YES
   64                                                      *REFUSER      *USE          *NO     *YES
   65                                                      *REFUSER      *USE          *NO     *YES
   69     Operations on Libraries                          *REFUSER      *USE          *NO     *YES
   70     Create Library     (CRTLIB)                      *REFUSER      *USE          *NO     *YES
   71     Edit Library List  (EDTLIBL)                     *REFUSER      *USE          *NO     *YES
   72     Add Library List   (ADDLIBLE)                    *REFUSER      *USE          *NO     *YES
   73     Change Library List(CHGLIBL)                     *REFUSER      *USE          *NO     *YES
   74     Transfer to Olympic(OLY PR N)                    *REFUSER      *USE          *NO     *YES
   79     MESSAGES                                         *REFUSER      *USE          *NO     *YES
   80     Send Break Message (SNDBRKMSG)                   *REFUSER      *USE          *NO     *YES
   81     Send Message       (SNDMSG)                      *REFUSER      *USE          *NO     *YES
   84     Daily Save on Lugano BRMS                        *REFUSER      *USE          *NO     *YES
   85     Operations with BRMS                             *REFUSER      *USE          *NO     *YES        16/03/12     50:57      15
   88     DSPLOGBRM                                        *REFUSER      *USE          *NO     *YES
   90     Work with Media Library Status                   *REFUSER      *USE          *NO     *YES
   95     GO BRMS                                          *REFUSER      *USE          *NO     *YES
   99     Operation with SAVE FILE                         *REFUSER      *USE          *NO     *YES
  100     Display Save file  (DSPSAVF)                     *REFUSER      *USE          *NO     *YES
  101     Create Save File   (CRTSAVF)                     *REFUSER      *USE          *NO     *YES
  102     Clear Save File    (CLRSAVF)                     *REFUSER      *USE          *NO     *YES
  109     Other Commands                                   *REFUSER      *USE          *NO     *YES
  110     Start PDM          (STRPDM)                      *REFUSER      *USE          *NO     *YES        11/04/11  14:57:21       1
  111     Retrieve CLP (RTVCLSRC)                          *REFUSER      *USE          *NO     *YES
  114     Initalize DIFSBS                                 *REFUSER      *USE          *NO     *YES
  115     Take QSYSOPR Msgq in Break                       *REFUSER      *USE          *NO     *YES
  116     Runqry *N operator/triggers                      *REFUSER      *USE          *NO     *YES
 (C) SRC Secure Solutions bv                     iMenu400 Authorised Options for User         28/05/12  15:39:36       Page     15
 =====================================================================================================================================
 Option   Option                                           User          Ref.user      Group               Date      Time      Number
 number   text                                             authority     authority     job      Activated  used      used     acesses
 _____________________________________________________________________________________________________________________________________
  117     Submit Job         (SBMJOB)                      *REFUSER      *USE          *NO     *YES
  118     TCP/IP Connection Status                         *REFUSER      *USE          *NO     *YES
  119                                                      *REFUSER      *USE          *NO     *YES
  120     GO EEPADM                                        *REFUSER      *USE          *NO     *YES
  121     Menu Backup(Use with caution)                    *REFUSER      *USE          *NO     *YES
  122     Full Backup of end of month                      *REFUSER      *USE          *NO     *YES
  123     Copy Spooled File (CPYSPLF)                      *REFUSER      *USE          *NO     *YES
  124                                                      *REFUSER      *USE          *NO     *YES
  125     Request Emergency Password EEP                   *REFUSER      *USE          *NO     *YES        12/05/11  15:02:59       2
  126     Change Password                                  *REFUSER      *USE          *NO     *YES         5/05/12   3:36:16      28
  127     Start TCP server                                 *REFUSER      *USE          *NO     *YES
  128     Work with TCP/IP Network Stat                    *REFUSER      *USE          *NO     *YES
  129     Call Mirage                                      *REFUSER      *USE          *NO     *YES
  130     Generation PDF Olyweb SGPOLY                     *REFUSER      *USE          *NO     *YES
  135                                                      *REFUSER      *USE          *NO     *YES
  140     Send Spool Files (SNDTCPSPLF)                    *REFUSER      *USE          *NO     *YES
  141     Create File (CRTPF)                              *REFUSER      *USE          *NO     *YES
  142     IPMON Monitoring                                 *REFUSER      *USE          *NO     *YES         1/09/11  22:02:51       2
  143                                                      *REFUSER      *USE          *NO     *YES
  145     Monthly maintenance BRMS                         *REFUSER      *USE          *NO     *YES
  146                                                      *REFUSER      *USE          *NO     *YES
  150     PM Spool  (PMSPO)                                *REFUSER      *USE          *NO     *YES
  152     WRKSPL                                           *REFUSER      *USE          *NO     *YES
  155                                                      *REFUSER      *USE          *NO     *YES
  160     Start HTTP server                                *REFUSER      *USE          *NO     *YES
  165                                                      *REFUSER      *USE          *NO     *YES
  170     WRKLNK                                           *REFUSER      *USE          *NO     *YES
  180     WRKAUTL                                          *REFUSER      *USE          *NO     *YES
  185     WRKPRB                                           *REFUSER      *USE          *NO     *YES
  195     Missing Subsystems (DIFSBS)                      *REFUSER      *USE          *NO     *YES
  200     Create Directory   (CRTDIR)                      *REFUSER      *USE          *NO     *YES
  202                                                      *REFUSER      *USE          *NO     *YES
  205     Check the Bloomberg file.                        *REFUSER      *USE          *NO     *YES
  207                                                      *REFUSER      *USE          *NO     *YES
  210     WRKSIT                                           *REFUSER      *USE          *NO     *YES
  220                                                      *REFUSER      *USE          *NO     *YES
  300                                                      *REFUSER      *USE          *NO     *YES
  333     TRANSFER TO @SYSTEMOPR                           *REFUSER      *USE          *NO     *YES
  400                                                      *REFUSER      *USE          *NO     *YES
  950     PWRDWNSYS                                        *REFUSER      *USE          *NO     *YES
  960                                                      *REFUSER      *USE          *NO     *YES
  999     SIGNOFF                                          *REFUSER      *USE          *NO     *YES         5/05/12   3:36:34      22
 (C) SRC Secure Solutions bv                     iMenu400 Authorised Options for User         28/05/12  15:39:36       Page     16
 =====================================================================================================================================
               *                                                                                                       *
 * * * * * * * * *      User information  . . . . . : User name . . . . . . . . . : ACEA                             * * * * * * * * *
               *                                      User text . . . . . . . . . : Carretta Mauro                     *
                                                      Begin menu  . . . . . . . . : *NONE
                                                      Group jobs  . . . . . . . . :  15
                                                      End group jobs  . . . . . . : *NO
                                                      Command line on menus . . . : *NO
                                                      Attention-key program . . . : *ACTIVE
                                                      Reference user  . . . . . . : OPERATOR
 =====================================================================================================================================
 Menu information:      Menu  . . . . . . . . . . . : ITOP
                        Menu text . . . . . . . . . : ITOP menu for the IBM operators
                        User authority  . . . . . . : *REFUSER
                        Reference user authority  . : *USE
 Option   Option                                           User          Ref.user      Group               Date      Time      Number
 number   text                                             authority     authority     job      Activated  used      used     acesses
 _____________________________________________________________________________________________________________________________________
    1     Job Schedul. BOD 06am EOD:20pm                   *REFUSER      *USE          *NO     *YES
    9     WRKJOBJS                                         *REFUSER      *USE          *NO     *YES        28/05/12   4:59:02     121
   10     Work with Job Scheduler (BOD)                    *REFUSER      *USE          *NO     *YES        28/05/12   3:23:29     148
   11     Work with Job Scheduler (EOD)                    *REFUSER      *USE          *NO     *YES        25/05/12  20:57:01     192
   12     Check JS History                                 *REFUSER      *USE          *NO     *YES        13/10/11   3:43:35       1
   13     WRKJOBSCDE                                       *REFUSER      *USE          *NO     *YES        23/05/12  17:10:27       3
   15     Save and Restore                                 *REFUSER      *USE          *NO     *YES
   20     Save Objects       (SAVOBJ)                      *REFUSER      *USE          *NO     *YES
   21     Restore Object     (RSTOBJ)                      *REFUSER      *USE          *NO     *YES
   22     Save Library       (SAVLIB)                      *REFUSER      *USE          *NO     *YES
   23     Restore Library    (RSTLIB)                      *REFUSER      *USE          *NO     *YES
   24     Save restore obj   (SAVRSTOBJ)                   *REFUSER      *USE          *NO     *YES
   25                                                      *REFUSER      *USE          *NO     *YES
   27     Work with commands                               *REFUSER      *USE          *NO     *YES
   28     Work with BRMS     (WRKMEDIBRM                   *REFUSER      *USE          *NO     *YES
   29     Work with object   (WRKOBJ)                      *REFUSER      *USE          *NO     *YES        18/12/11  16:31:07       5
   30     Active Jobs        (WRKACTJOB)                   *REFUSER      *USE          *NO     *YES        28/05/12   3:41:11     251
   31     MQSeries           (WRKMQM)                      *REFUSER      *USE          *NO     *YES
   32     Configurat.status  (WRKCFGSTS)                   *REFUSER      *USE          *NO     *YES         6/05/12  17:03:49       7
   33     Submitted Jobs     (WRKSBMJOB)                   *REFUSER      *USE          *NO     *YES
   34     Object Locks       (WRKOBJLCK)                   *REFUSER      *USE          *NO     *YES
   35     Work with Job      (WRKJOB)                      *REFUSER      *USE          *NO     *YES        25/05/12  16:55:28      56
   36     Work with Writers  (WRKWTR)                      *REFUSER      *USE          *NO     *YES        30/09/11  16:01:08       6
   37     Output Queues      (WRKOUTQ)                     *REFUSER      *USE          *NO     *YES
   38     Spool Files        (WRKSPLF)                     *REFUSER      *USE          *NO     *YES         6/05/12  16:02:30       1
   39                                                      *REFUSER      *USE          *NO     *YES
   40     Device Description (WRKDEVD)                     *REFUSER      *USE          *NO     *YES
   41     Work with Libraries(WRKLIB)                      *REFUSER      *USE          *NO     *YES
   42     With Subsystems    (WRKSBS)                      *REFUSER      *USE          *NO     *YES         6/05/12  17:08:57      26
 (C) SRC Secure Solutions bv                     iMenu400 Authorised Options for User         28/05/12  15:39:36       Page     17
 =====================================================================================================================================
 Option   Option                                           User          Ref.user      Group               Date      Time      Number
 number   text                                             authority     authority     job      Activated  used      used     acesses
 _____________________________________________________________________________________________________________________________________
   43     System Activity    (WRKSYSACT)                   *REFUSER      *USE          *NO     *YES         6/05/12  17:47:33       2
   44     System Status      (WRKSYSSTS)                   *REFUSER      *USE          *NO     *YES         6/05/12  17:47:42       2
   45     User Jobs          (WRKUSRJOB)                   *REFUSER      *USE          *NO     *YES
   46     WORK Subsystem Jobs(WRKSBSJOB)                   *REFUSER      *USE          *NO     *YES
   47     User Profiles      (DSPUSRPRF)                   *REFUSER      *USE          *NO     *YES         9/05/11  12:40:06       3
   48     Media using BRM    (WRKMEDBRM)                   *REFUSER      *USE          *NO     *YES
   49     Work with Job Queue(WRKJOBQ)                     *REFUSER      *USE          *NO     *YES        13/10/11     56:04       1
   50     DISPLAY                                          *REFUSER      *USE          *NO     *YES
   51     Display Message Qu.(DSPMSG)                      *REFUSER      *USE          *NO     *YES
   52                                                      *REFUSER      *USE          *NO     *YES
   53     Work with Sys.Value(WRKSYSVAL)                   *REFUSER      *USE          *NO     *YES
   54     Display Data Area  (DSPDTAARA)                   *REFUSER      *USE          *NO     *YES        10/10/11   1:56:44       3
   55     Display Job Log    (DSPJOBLOG)                   *REFUSER      *USE          *NO     *YES         6/05/12  16:02:50       2
   56     Display Log        (DSPLOG)                      *REFUSER      *USE          *NO     *YES
   57     Display Library    (DSPLIB)                      *REFUSER      *USE          *NO     *YES
   58     Display Program    (DSPPGM)                      *REFUSER      *USE          *NO     *YES
   59     Start Backup  BRM  (STRBKUBRM)                   *REFUSER      *USE          *NO     *YES
   60     Change Data Area   (CHGDTAARA)                   *REFUSER      *USE          *NO     *YES
   61     Open/Close Subsystem                             *REFUSER      *USE          *NO     *YES
   62     Start Subsystem    (STRSBS)                      *REFUSER      *USE          *NO     *YES         1/04/12  19:06:17       4
   63     End Subsystem      (ENDSBS)                      *REFUSER      *USE          *NO     *YES
   64                                                      *REFUSER      *USE          *NO     *YES
   65                                                      *REFUSER      *USE          *NO     *YES
   69     Operations on Libraries                          *REFUSER      *USE          *NO     *YES
   70     Create Library     (CRTLIB)                      *REFUSER      *USE          *NO     *YES
   71     Edit Library List  (EDTLIBL)                     *REFUSER      *USE          *NO     *YES
   72     Add Library List   (ADDLIBLE)                    *REFUSER      *USE          *NO     *YES
   73     Change Library List(CHGLIBL)                     *REFUSER      *USE          *NO     *YES
   74     Transfer to Olympic(OLY PR N)                    *REFUSER      *USE          *NO     *YES
   79     MESSAGES                                         *REFUSER      *USE          *NO     *YES
   80     Send Break Message (SNDBRKMSG)                   *REFUSER      *USE          *NO     *YES
   81     Send Message       (SNDMSG)                      *REFUSER      *USE          *NO     *YES
   84     Daily Save on Lugano BRMS                        *REFUSER      *USE          *NO     *YES
   85     Operations with BRMS                             *REFUSER      *USE          *NO     *YES         6/05/12  16:25:45      84
   88     DSPLOGBRM                                        *REFUSER      *USE          *NO     *YES         6/05/12  17:30:43       9
   90     Work with Media Library Status                   *REFUSER      *USE          *NO     *YES         9/01/12     36:11       8
   95     GO BRMS                                          *REFUSER      *USE          *NO     *YES         8/05/11  17:44:31       5
   99     Operation with SAVE FILE                         *REFUSER      *USE          *NO     *YES
  100     Display Save file  (DSPSAVF)                     *REFUSER      *USE          *NO     *YES
  101     Create Save File   (CRTSAVF)                     *REFUSER      *USE          *NO     *YES        20/10/11   5:06:39       1
  102     Clear Save File    (CLRSAVF)                     *REFUSER      *USE          *NO     *YES
  109     Other Commands                                   *REFUSER      *USE          *NO     *YES
  110     Start PDM          (STRPDM)                      *REFUSER      *USE          *NO     *YES         1/04/12  19:06:46       7
  111     Retrieve CLP (RTVCLSRC)                          *REFUSER      *USE          *NO     *YES        10/11/11  20:16:41       2
  114     Initalize DIFSBS                                 *REFUSER      *USE          *NO     *YES
  115     Take QSYSOPR Msgq in Break                       *REFUSER      *USE          *NO     *YES
  116     Runqry *N operator/triggers                      *REFUSER      *USE          *NO     *YES
 (C) SRC Secure Solutions bv                     iMenu400 Authorised Options for User         28/05/12  15:39:36       Page     18
 =====================================================================================================================================
 Option   Option                                           User          Ref.user      Group               Date      Time      Number
 number   text                                             authority     authority     job      Activated  used      used     acesses
 _____________________________________________________________________________________________________________________________________
  117     Submit Job         (SBMJOB)                      *REFUSER      *USE          *NO     *YES
  118     TCP/IP Connection Status                         *REFUSER      *USE          *NO     *YES
  119                                                      *REFUSER      *USE          *NO     *YES
  120     GO EEPADM                                        *REFUSER      *USE          *NO     *YES        11/04/11  14:51:18       1
  121     Menu Backup(Use with caution)                    *REFUSER      *USE          *NO     *YES
  122     Full Backup of end of month                      *REFUSER      *USE          *NO     *YES         6/05/12  12:13:23      12
  123     Copy Spooled File (CPYSPLF)                      *REFUSER      *USE          *NO     *YES
  124                                                      *REFUSER      *USE          *NO     *YES
  125     Request Emergency Password EEP                   *REFUSER      *USE          *NO     *YES        12/05/11  14:54:35       7
  126     Change Password                                  *REFUSER      *USE          *NO     *YES         8/05/12  16:12:15       3
  127     Start TCP server                                 *REFUSER      *USE          *NO     *YES
  128     Work with TCP/IP Network Stat                    *REFUSER      *USE          *NO     *YES
  129     Call Mirage                                      *REFUSER      *USE          *NO     *YES        28/05/12   3:43:50      68
  130     Generation PDF Olyweb SGPOLY                     *REFUSER      *USE          *NO     *YES        28/05/12   4:00:44      61
  135                                                      *REFUSER      *USE          *NO     *YES
  140     Send Spool Files (SNDTCPSPLF)                    *REFUSER      *USE          *NO     *YES
  141     Create File (CRTPF)                              *REFUSER      *USE          *NO     *YES         6/05/11  21:14:15       1
  142     IPMON Monitoring                                 *REFUSER      *USE          *NO     *YES        25/05/12  16:43:31       7
  143                                                      *REFUSER      *USE          *NO     *YES
  145     Monthly maintenance BRMS                         *REFUSER      *USE          *NO     *YES         6/05/12  16:55:41       5
  146                                                      *REFUSER      *USE          *NO     *YES
  150     PM Spool  (PMSPO)                                *REFUSER      *USE          *NO     *YES
  152     WRKSPL                                           *REFUSER      *USE          *NO     *YES
  155                                                      *REFUSER      *USE          *NO     *YES
  160     Start HTTP server                                *REFUSER      *USE          *NO     *YES
  165                                                      *REFUSER      *USE          *NO     *YES
  170     WRKLNK                                           *REFUSER      *USE          *NO     *YES        28/05/12   3:59:11      72
  180     WRKAUTL                                          *REFUSER      *USE          *NO     *YES
  185     WRKPRB                                           *REFUSER      *USE          *NO     *YES         4/05/12  22:16:54       3
  195     Missing Subsystems (DIFSBS)                      *REFUSER      *USE          *NO     *YES
  200     Create Directory   (CRTDIR)                      *REFUSER      *USE          *NO     *YES
  202                                                      *REFUSER      *USE          *NO     *YES
  205     Check the Bloomberg file.                        *REFUSER      *USE          *NO     *YES
  207                                                      *REFUSER      *USE          *NO     *YES
  210     WRKSIT                                           *REFUSER      *USE          *NO     *YES
  220                                                      *REFUSER      *USE          *NO     *YES
  300                                                      *REFUSER      *USE          *NO     *YES
  333     TRANSFER TO @SYSTEMOPR                           *REFUSER      *USE          *NO     *YES
  400                                                      *REFUSER      *USE          *NO     *YES
  950     PWRDWNSYS                                        *REFUSER      *USE          *NO     *YES         6/05/12  16:03:35       7
  960                                                      *REFUSER      *USE          *NO     *YES
  999     SIGNOFF                                          *REFUSER      *USE          *NO     *YES        28/05/12   4:57:26      86
 (C) SRC Secure Solutions bv                     iMenu400 Authorised Options for User         28/05/12  15:39:36       Page     19
 =====================================================================================================================================
               *                                                                                                       *
 * * * * * * * * *      User information  . . . . . : User name . . . . . . . . . : ACHNG                            * * * * * * * * *
               *                                      User text . . . . . . . . . : Aileen Chng                        *
                                                      Begin menu  . . . . . . . . : MAIN
                                                      Group jobs  . . . . . . . . :  15
                                                      End group jobs  . . . . . . : *NO
                                                      Command line on menus . . . : *NO
                                                      Attention-key program . . . : *ACTIVE
                                                      Reference user  . . . . . . : *MULTIPLE
 Reference User
 _____________________________________________________________________________________________________________________________________
 ALLUSR      Main Menu User                                         GRPCREIA    Credit & Risk
 =====================================================================================================================================


The requirement

1) extract data from "user information" (User name,User text,Begin menu,Group jobs ,End group jobs ,Command line on menus,Attention-key program,Reference user )

2) For reference user as "multiple" get the group information, in this example i use(GRPCREIA , Credit & Risk) which mean if line equal to "allusr" extract the data afterward (take note: there might be more than 1 group, the one i use here only shown1, it is advisable to look into the actual file.

A sample ouput shall be like this:

Code: Select all

UserName,User Text,Begin Menu,Group Jobs,End Group Jobs,Command Line on Menus,Attention-Key Program,Reference user,Group I,Group I Description,Group II,Group II Description,Group III,Group III Description,Group IV,Group IV Description,Group V,Group V Description,Group VI,Group VI Description
ACHNG,Aileen Chng,MAIN,15,*NO,*NO,*ACTIVE,*MULTIPLE,GRPCREIA,CREDIT&RISK


The existing solution provided by @Aacini has done a great job to meet the requirement. However, because of my careless didn't provide the source data completely.
To overcome this, the batch file can be modified to ensure data processing.
ignore content that start from Menu information to option number & option text.
Once it finished the loop for :writeRecord then goto find user information to start the new entry.

Once again, thanks to Aacini and foxidrive for the help up. If you are new to forum (like me) it is encourage to read up the guide to post :)


regards,
cheeseng

Aacini
Expert
Posts: 1927
Joined: 06 Dec 2011 22:15
Location: México City, México
Contact:

Re: [help] i need to extract data from a text file via batch

#37 Post by Aacini » 05 Jun 2012 21:37

Wow! I can't belive you can not follow a very simple request! I'll try to explain this for the very last time...

I used the data you posted in this site to write my program. However, when you used my program with your real data, the program don't work. This mean that the data that appear in this site is different from the data you uploaded in the dropbox, right? (because if both data were the same, my program should run with your real data file, right?).

The new version of my program (that I have not posted here yet) correctly run with your real data file. This mean that I identified the difference between both data, that is, the difference between the data that you posted in this site versus the real data that you uploaded in the dropbox.

Well, my request is that you also identify what that difference is and describe it.

Please, don't reply that the file in dropbox is bigger (20 MB), nor that the several data examples you posted here was incomplete or contain added remarks; all those changes are obvious (although not for you, perhaps?).

I just want that you explain the only detail that has not been explained yet: why my program correctly run with the example data (that appear posted in this site), but not with the real data (that you uploaded in dropbox).

Please, don't post the data again, nor explain your problem again, nor explain anything that don't be THAT DIFFERENCE IN THE DATA.

I will not reply to this topic again if you not post the right answer...

cheeseng
Posts: 19
Joined: 30 May 2012 03:36

Re: [help] i need to extract data from a text file via batch

#38 Post by cheeseng » 06 Jun 2012 01:07

hi Aacini,

i think i figured it out! :D
The mistake is about SPACING!!!
Because in the data i posted over here is start from the beginning.
thats why when you the space is 23 character to reach "user information"
hence the code is like the following.

Code: Select all

if "!line:~23,16!" neq "User information" goto processRecord
   for /F "tokens=3 delims=:" %%a in ("!line!") do (
      for /F %%b in ("%%a") do (
         set record=%%b
      )
   )


whereas in the dropbox file it is start from 1 space after, that why count 24 character onward.... Hence, if the code change to 24 it work!!!!!

Code: Select all

if "!line:~24,16!" neq "User information" goto processRecord
   for /F "tokens=3 delims=:" %%a in ("!line!") do (
      for /F %%b in ("%%a") do (
         set record=%%b
      )
   )


i try to understand the code...

for /F "tokens=3 delims=:" %%a in ("!line!") i understand is that take data from the 3rd column where column is identified by ":"

for /L %%i in (2,1,%numFields%) do (
set /P line=
for /F "tokens=2 delims=:" %%a in


Since you should the number of field is 8, then for condition that 2nd row onward each time increment 1, untill 8. This time take the 2nd column.

Then, for this one is handle the condition for reference user to be "multiple" if it is not multiple echo the record,
if it is multiple go to check the "allusr"
AGAIN, here i make a mistake should be start from 1 character onward because the spacing error again

Code: Select all

 if /I "!token!" neq " *MULTIPLE" goto writeRecord
   :firstGroup
      set line=
      set /P line=
   if "!line:~0,6!" neq "ALLUSR" goto firstGroup
   set "line=!line:~50!


correct one shld be like this

Code: Select all

 if /I "!token!" neq " *MULTIPLE" goto writeRecord
   :firstGroup
      set line=
      set /P line=
   if "!line:~1,6!" neq "ALLUSR" goto firstGroup
   set "line=!line:~50!




:D :D
I do observe the process a bit slow..
Thank you very much Aacini...you have really help me improve a lot in batch file..
regards,
cheeseng

Aacini
Expert
Posts: 1927
Joined: 06 Dec 2011 22:15
Location: México City, México
Contact:

Re: [help] i need to extract data from a text file via batch

#39 Post by Aacini » 06 Jun 2012 21:37

OK! The new program below is MUCH FASTER than previous version:

Code: Select all

@echo off
setlocal EnableDelayedExpansion

set header=UserName,User Text,Begin Menu,Group Jobs,End Group Jobs,Command Line on Menus,Attention-Key Program,Reference user
for %%a in (I II III IV V VI) do set header=!header!,Group %%a,Group %%a Description
echo %header%> outputFile.csv

set lastLine=0
ECHO START: %TIME% >&2
call :processRecord < input.txt >> outputFile.csv
ECHO/>&2
ECHO END: %TIME% >&2
goto :EOF


:processRecord
for /F "delims=:" %%n in ('findstr /N /C:"User information" input.txt') do (
   set /A skip=%%n-lastLine, lastLine=%%n
   for /L %%i in (1,1,!skip!) do set /P line=
   for /F "tokens=3 delims=:" %%a in ("!line!") do (
      for /F %%b in ("%%a") do (
         set record=%%b
         SET /P "=%%b, " <NUL >&2
      )
   )
   for /L %%i in (2,1,8) do (
      set /P line=
      for /F "tokens=2 delims=:" %%a in ("!line!") do set "token=%%a"
      if %%i equ 2 (
         set "token=!token:  =!"
         set "token=!token:~0,-1!"
         if "!token:~-1!" equ " " set "token=!token:~0,-1!"
      )
      set "record=!record!,!token:~1!"
   )
   set /A lastLine+=7
   if "!token!" equ " *MULTIPLE" (
      for /L %%i in (1,1,3) do set /P line=
      set /A lastLine+=3
      set "line=!line:~55!"
      call :processGroup
   )
   echo !record!
)
exit /B


:processGroup
set group=
set description=
set "halfLine=!line:~0,55!"
for %%a in (!halfLine!) do (
   if not defined group (
      set "group=%%a"
   ) else (
      set "description=!description!%%a "
   )
)
set "record=!record!,!group!,!description:~0,-1!"
set "line=!line:~55!"
if defined line goto processGroup
set /P line=
set /A lastLine+=1
if "!line:~0,4!" equ " GRP" goto processGroup
set "record=!record:,),~0,-1=)!"
exit /B


Remember to first convert the original Unicode file to Ascii with:

Code: Select all

type new_input.txt > input.txt


Antonio

Post Reply