jump to navigation

ISCSI TECHNOLOGIES FOR SYSTEM I October 9, 2006

Join the Midlands Midrange User Group, IBM and MSI Systems Integrators as we welcome Bob Schuster from IBM’s Rochester Executive Briefing Center to discuss iSCSI and Blade integration for System i. IBM has extended industry-standard iSCSI technology to attach selected BladeCenter and System x models to the System i platform so you can exploit System i virtual storage, networking, and tape resources to help simplify the operations of your Windows or Linux Server system infrastructure.

Download the pdf file for further details.

When : Thursday, October 24, 2006
Time : 11:00 a.m. to 1:00 0 p.m.
Where : MSI Systems Integrators
14301 First National Parkway, Ste 400
Omaha, NE 68164
NE corner of 144th & Dodge

Registration : Visit the MSI website to register at http://www.msiinet.com/events

Agenda
10:45 a.m. Registration
11:00 a.m. Welcome & Introductions
11:15 a.m. iSCSI Technologies by Bob Schuster, IBM and Patrick Bingham, MSI
12:30 p.m. Question & Answer Session
01:00 p.m. Wrap-up

Grand Prize Drawing : Attendees will be eligible for an Omaha Steaks prize package drawing complements of MSI



Possible Related Links
  • Introduction
  • PHP on the System i - Lunch and Learn
  • FOR SALE: IBM iSeries Model 825

  • PHP on iSeries September 18, 2006

    After an excellent presentation on last Tuesday by Leonardo Llames on PHP on iSeries, we are pleased to share his presentation slides with our members. Just click here to download the file in PDF format.

    If you cannot download the file, please contact us using this form:



    Possible Related Links
  • QSHELL on iSeries
  • iSeries RPG programming links
  • FOR SALE: IBM iSeries Model 825

  • PHP on the System i - Lunch and Learn August 29, 2006

    Join IBM and High Plains Technology to learn about the recent announcement that customers can now implement PHP on the System i and i5/OS. PHP is the leading scripting language deployed on the internet. See how this technology can be deployed on the System i and how it can be used to access i5/OS resources. In this session, IBM’s Leonardo Llames from the Rochester Advanced Technical Support Team (ATS) will review:
     Zend Studio for i5/OS
     Zend Core
     Access to i5/OS Resources
     DB2 for i5/OS
     Program Call
     Data Area
     Data Queue
     Message Queue
     Zend Platform
     Support
     System requirements
     Installation

    Each session will include a complimentary lunch and an opportunity to stay after to ask Leonardo your in-depth questions. Each session will begin promptly at 11:00 a.m.

    Thank you to the Omaha (MMUG) and Fargo User Groups for co-sponsoring the sessions in Nebraska and North Dakota! We appreciate the close partnership with these organizations.

    When Tuesday, September 12th, 2006
    Where Westside Conference Center
    3534 South 108th Street
    Check-in 10:30AM to 11:00AM
    Session/
    Complimentary
    Lunch
    11:00AM to 1:00AM
    RSVP Bo Gebbie :: gebbie @ us.ibm.com :: 402-399-4460
    by Thursday, September 8th, 2006


    Possible Related Links
  • iSeries RPG programming links
  • ISCSI TECHNOLOGIES FOR SYSTEM I
  • New Events Page

  • Data Mapping Question August 23, 2006

    MMUG received an email from a iSeries user about data mapping. If some one has dealt with this problem before and can help this user, please contact us or post the solution by clicking on Comments.

    We are looking to see if there are any tools available or maybe 3rd party software available that other iSeries users have used and have been successful in a data move.

    We will be migrating to an ‘off the shelf’ software package. Prior to the move, we want to have as much as possible, “clean data” to migrate into the new software package. We have currently been using queries and sql statements to identify the bad data, fix it, then use the CPYF command in a CL to copy the data into our staging files. These staging files will then be used to migrate the data into the new software. We are thinking there is a “better way” or a more efficient way.

    What we have been running into is that if you run the CPYF CL first, it will stop on the first record that contains bad data (the staging file has been set up with more constraints than the file that we are copying from) and then not continue through the other records but end out. It would be nice if it would write out the bad record to some type of log file (it does write out the record number in the QEZJOBLOG) and then continue on with copying over the other good records . The type of error the CL throws is an unrecoverable read/write error and therefore won’t continue on.

    Have you been through any kind of data moves that you may have used a third party tool or a way on the iSeries to accomplish this feat? Any suggestions or advice is appreciated.



    Possible Related Links
  • iSeries Users Group Forums are now open
  • ISCSI TECHNOLOGIES FOR SYSTEM I
  • PHP on the System i - Lunch and Learn

  • MMUG Meeting Survey August 2, 2006



    Possible Related Links
  • MMUG Meeting on June 15th, 2006
  • Introduction
  • New Events Page

  • FOR SALE: IBM iSeries Model 825 July 29, 2006

    We received a request from Jeff Willer from CSG Systems, which is as follows:

    (Please note: Any questions about this system must be directed to Jeff Willer of CSG Systems. Midlands Midrange Users Group and it’s officers are not responsible and are not involved in any transaction related to this sale. This information is provided as a service to our members.)

    Attached here is spec sheet on the machine we will have available for sale. The machine is three years old and is located in Omaha. It will be available in mid-September. I can appreciate the policy of guarding the names and contacts of your membership, and therefore will ask that you share this information with your membership and ask them to contact us if they have any interest. Contact information is included in the spec sheet. We will consider any reasonable offer.

    Spec-Sheet is as follows:

    IBM iSeries Model 825

    Hardware
    Basic Machine: iSeries 9406 Model 825 Enterprise Edition 7418
    Serial Number: 10-2695C
    Purchase Date: August, 2003
    Processors: 3/6 way (3300/6600 CPW); 5 processors activated
    Operating Systems: Version 5 Release 2
    Configuration: 3 Partitions: Primary, Production, Test
    Memory: 22.5 GB
    0.7 Primary
    10.2 Production
    11.6 Test
    Disk: 2.1 TB
    0.00 Primary (2 – 35.16 disks, mirrored)
    1.06 Production (16 – 35.16 and 9 – 70.56 disks, RAID 5)
    1.09 Test (22 – 35.16 and 8 – 70.56 disks, RAID 5)

    Tape Drive: IBM Model 3590-H11Enterprise (10 cartridge)

    Software
    5722BR1 IBM Backup Recovery and Media Services for iSeries
    5722PT1 IBM Performance Tools for iSeries
    5722QU1 IBM Query for iSeries
    5722SS1 Operating System/400
    5722ST1 IBM DB2 Query Manager and SQL Development Kit
    5722WDS IBM Websphere Studio Development Suite
    5722XW1 IBM eServer iSeries Access Family (40 licenses)

    Original Purchase Price (reference only): $680,000

    If interested, please contact:
    Jeff Willer 402-964-1519 Jeff_Willer -at- csgsystems.com
    -or-
    Dennis Smid 402-963-8600 Dennis_Smid -at- csgsystems.com



    Possible Related Links
  • Current For Sale Items
  • For Sale
  • MCPressOnline iSeries Book Sale

  • Convert any iSeries database file to CSV format July 2, 2006

    Here is a utility that will convert any iSeries database file to CSV (Comma Seperated Values) format with a delimiter of your choice. You can choose the delimiter
    because it is very possible to have a comma in a description. So choose wisely.

    I was forced to write this utility and here is why. I had a project to transfer data files from the iSeries 400 to a server that was running California Software Baby 400 system.

    Seems simple enough just use the CPYFRMSTMF command or the CPYFRMIMPF right?
    Yeah I thought so too. Well as I tried to use these commands as I have used them before and they work just fine if you have a good database file. But IBM did not think of everything
    that programmers can do to a database file.

    In my case I ran across (and not in just one file) packed numeric data. So what is the problem you ask? The data length of these packed fields were 1 bytes and 2 bytes. Why would you pack a 1 byte numeric field or even a 2 byte numeric field? The above mentioned command did not stop but they did not work either. Can you guess what they did? ……. Ok times up, they took those fields and extended them by 1 byte so the 1 byte packed became 2 bytes and the 2 bytes became 3 bytes. No matter what I did I could not get the file converted correctly on iSeries.

    So either I can write a 100 or so programs (which I decided not to do) or write a utility to do all the work for me. Which is what I did and I am sharing this with whoever wants to use it. Feel free to use it and to make what ever changes you need for your use.

    All the work is done in QTEMP. The process creates a work file call CVFILEO and a
    temporary library with QRPGLESRC and a temporary program called CVPGM. The temp library is the use name with a ‘@’ in front of it. Example: if the user name is kfoland
    the library name will be @kfoland.

    So we have one work file called CVFILEO.
    One command called CVF2CSV. Compiled to call CV0CL.
    Two CL programs CV0CL and CV1CL.
    Two RPGLE programs CV1 and CV2.

    The simple process is as follows:

    1. Delete temp files
    2. Create duplicate object CVFILEO into QTEMP
    3. Display field description on the incoming file into a file called CVFILE
    4. Call CV1 to get the record length and call CV1CL to build the flat file with the given
    record length.
    5. Create the temp library.
    6. Create QRPGLESRC in the temp library
    7. Add the physical file member CVPGM to QRPGLESRC in the temp library
    8. Call CV2 to read the incoming file and to create the temp program CVPGM.
    9. Compile CVPGM
    10. Call CVPGM
    11. Copy the flat file from QTEMP to the out going file.

    To get started, compile the file, command and the programs.

    Prompt up the command and fill out the parms or just call CV0VL with the following parms.

    PARM(&FILE &LIBR &TFILE &TLIBR &DEM)

    where

    &FILE = database file to be converted
    &LIBR = library were the database file is located
    &TFILE = name you want for the converted file
    &TLIBR = library where the converted file will be
    &DEM = the delimiter you want to use. Choose wisely

    After the process runs you can check out the temp library and the program that was created in QSYS as the library will get deleted at the beginning of the process. You can change this if you want to delete the library at the end of the process. The process will delete any files or libraries in QTEMP as it runs.

    This has help me so I hope it can help others as well.


    1. /********************************************/
    2. /* COMMAND NAME IS CVF2CSV                                   */
    3. /* This command will call CV0CL to convert a database file*/
    4. /* to CSV format with your choice of delimiter                 */
    5. /********************************************/
    6.  
    7.              CMD        PROMPT(‘Convert File to CSV Format’)
    8.              PARM       KWD(FROMFILE) TYPE(*CHAR) LEN(10) +
    9.                           PROMPT(‘Enter File to Convert’)
    10.              PARM       KWD(FROMLIBR) TYPE(*CHAR) LEN(10) +
    11.                           PROMPT(‘Enter Library for Input File’)
    12.              PARM       KWD(TOFILE) TYPE(*CHAR) LEN(10) +
    13.                           PROMPT(‘Converted File Name’)
    14.              PARM       KWD(TOLIBR) TYPE(*CHAR) LEN(10) +
    15.                           PROMPT(‘Library for Converted File’)
    16.              PARM       KWD(DELIMITER) TYPE(*CHAR) LEN(1) DFT(‘~’) +
    17.                           PROMPT(‘Delimiter’)

    1. /******************************************/
    2. /* CL name is cv0cl                                                  */
    3. /* CL to run the process to convert a file passed to csv */
    4. /* file format                                                          */
    5. /******************************************/
    6.  
    7.              PGM        PARM(&FILE &LIBR &TFILE &TLIBR &DEM)
    8.              DCL        VAR(&LIBR)   TYPE(*CHAR) LEN(10)
    9.              DCL        VAR(&FILE)   TYPE(*CHAR) LEN(10)
    10.              DCL        VAR(&TLIBR)  TYPE(*CHAR) LEN(10)
    11.              DCL        VAR(&TFILE)  TYPE(*CHAR) LEN(10)
    12.              DCL        VAR(&USER)   TYPE(*CHAR) LEN(10)
    13.              DCL        VAR(&WLIBR)  TYPE(*CHAR) LEN(10)
    14.              DCL        VAR(&DEM)    TYPE(*CHAR) LEN(1)
    15.              DCL        VAR(&LENGTH) TYPE(*CHAR) LEN(5)
    16.              DCL        VAR(&MSGID)  TYPE(*CHAR) LEN(7)
    17.              DCL        VAR(&MSG)    TYPE(*CHAR) LEN(100)
    18.              DCL        VAR(&MSGF)   TYPE(*CHAR) LEN(10)
    19.              MONMSG     MSGID(CPF0000) EXEC(GOTO CMDLBL(ERROR))
    20.              RTVJOBA    USER(&USER)
    21.              CHKOBJ     OBJ(&LIBR/&FILE) OBJTYPE(*FILE)
    22.              DLTF       FILE(QTEMP/CVFILE)
    23.              MONMSG     MSGID(CPF0000)
    24.              DLTF       FILE(QTEMP/CVFLAT)
    25.              MONMSG     MSGID(CPF0000)
    26.              DLTF       FILE(QTEMP/CVFILEO)
    27.              MONMSG     MSGID(CPF0000)
    28.              CRTDUPOBJ  OBJ(CVFILEO) FROMLIB(KFOLAND) OBJTYPE(*FILE) +
    29.                           TOLIB(QTEMP)
    30.              DSPFFD     FILE(&LIBR/&FILE) OUTPUT(*OUTFILE) +
    31.                           OUTFILE(QTEMP/CVFILE)
    32.              OVRDBF     FILE(CVFILE) TOFILE(QTEMP/CVFILE)
    33.              OVRDBF     FILE(CVFILEO) TOFILE(QTEMP/CVFILEO)
    34.              CALL       PGM(CV1) PARM(&LENGTH)
    35.              IF         COND(&LENGTH *NE ‘00000′) THEN(DO)
    36.              CHGVAR     VAR(&WLIBR) VALUE(‘@’ *TCAT %SUBSTRING(&USER +
    37.                           1 9))
    38.  
    39. /* create the temp library for the temp program             */
    40.  
    41.              DLTLIB     LIB(&WLIBR)
    42.              MONMSG     MSGID(CPF0000)
    43.              CRTLIB     LIB(&WLIBR)
    44.              CRTSRCPF   FILE(&WLIBR/QRPGLESRC) RCDLEN(112)
    45.              ADDPFM     FILE(&WLIBR/QRPGLESRC) MBR(cvpgm) +
    46.                           TEXT(‘Convert program’) SRCTYPE(RPGLE)
    47.              OVRDBF     FILE(cvpgm) TOFILE(&WLIBR/QRPGLESRC) +
    48.                           MBR(cvpgm)
    49.              OVRDBF     FILE(CVFLAT) TOFILE(QTEMP/CVFLAT)
    50.              CALL       PGM(CV2) PARM(&FILE &LENGTH &DEM)
    51.              DLTOVR     FILE(*ALL)
    52.              OVRDBF     FILE(&FILE) TOFILE(&LIBR/&FILE)
    53.              CRTBNDRPG  PGM(&WLIBR/CVPGM) SRCFILE(&WLIBR/QRPGLESRC) +
    54.                           OUTPUT(*PRINT)
    55.              OVRDBF     FILE(&FILE) TOFILE(&LIBR/&FILE)
    56.              OVRDBF     FILE(CVFLAT) TOFILE(QTEMP/CVFLAT)
    57.              CALL       PGM(&WLIBR/cvpgm)
    58.              DLTOVR     FILE(*ALL)
    59.              CPYF       FROMFILE(QTEMP/CVFLAT) TOFILE(&TLIBR/&TFILE) +
    60.                           MBROPT(*REPLACE) CRTFILE(*YES)
    61.              ENDDO
    62.              GOTO       CMDLBL(ENDPGM)
    63.              /*                                                      */
    64.              /*—————————————*/
    65.              /* NORMAL PROGRAM EXIT                      */
    66.              /*—————————————*/
    67.              /*                                                      */
    68.  
    69.  EXIT:       GOTO       CMDLBL(ENDPGM)
    70.              /*                                                      */
    71.              /*—————————————*/
    72.              /*  ERROR HANDLING ROUTINE                 */
    73.              /*—————————————*/
    74.              /*                                                      */
    75.  
    76.  ERROR:      RCVMSG     MSGDTA(&MSG) MSGID(&MSGID) MSGF(&MSGF)
    77.              MONMSG     MSGID(CPF0000)
    78.              SNDPGMMSG  MSGID(&MSGID) MSGF(&MSGF) MSGDTA(&MSG) +
    79.                           MSGTYPE(*ESCAPE)
    80.              MONMSG     MSGID(CPF0000)
    81.              GOTO       CMDLBL(ENDPGM)
    82.              /*                                                      */
    83.              /*                                                      */
    84.  
    85.  ENDPGM:     ENDPGM

    1. H OPTION(*Srcstmt : *Nodebugio)
    2.      A********************************************
    3.      A* program name IS cv1                                                *
    4.      A* figure the record length of the file being converted        * 
    5.      A********************************************
    6.      A*
    7.      fCvfile    IF   e             Disk    Usropn
    8.      fCvfileo   o    e             Disk
    9.      A*
    10.      d @Total          s              5  0
    11.      d @FIELDS         s              5  0
    12.      d @Start          s              5  0
    13.      d @Length         s              5
    14.      A*   
    15.      c     *Entry        Plist
    16.      c                   Parm                    @Length
    17.      A* Open AND READ the file AND figure the new length
    18.      A* after ALL the packed FIELDS are unpacked
    19.      c                   Open      Cvfile
    20.      c                   DoU       %Eof(Cvfile)
    21.      c                   READ      Cvfile
    22.      c                   IF        NOT %Eof(Cvfile)
    23.      c
    24.      A*   
    25.      c                   Eval      @FIELDS = Whnfld
    26.      A* IF packed then USE the unpacked length
    27.      c                   IF        Whfldt = ‘P’
    28.      c                   Eval      Whfldb = Whfldd
    29.      c                   EndIf
    30.      c                   IF        Whfldt = ‘A’
    31.      c                   Eval      @Total = @Total + 2
    32.      c                   EndIf
    33.      c                   IF        Whfldp <> *Zeros
    34.      c                   Eval      @Total = @Total + 2
    35.      c                   EndIf
    36.      A* ADD TO get the new total record length
    37.      c                   Eval      @Total = @Total + Whfldb
    38.      A*   
    39.      A*   
    40.      c                   EndIf
    41.      c                   EndDo
    42.      A*
    43.      c                   Close     Cvfile
    44.      c                   Eval      @Total = @Total + @FIELDS
    45.      c                   Move      @Total        @Length
    46.      c                   IF        @Total <> *Zeros
    47.      A* CREATE the flat file
    48.      c                   Call      ‘CV1CL’
    49.      C                   Parm                    @Total
    50.      A*   
    51.      c                   EndIf
    52.      A*   
    53.      c                   Eval      @Start = 0
    54.      A* Open AND READ the file AND output info TO work file
    55.      c                   Open      Cvfile
    56.      c                   DoU       %Eof(Cvfile)
    57.      c                   READ      Cvfile
    58.      c                   IF        NOT %Eof(Cvfile)
    59.      A*   
    60.      A* IF packed then USE the unpacked length
    61.      c                   IF        Whfldt = ‘P’
    62.      c                   Eval      Whfldb = Whfldd
    63.      c                   Eval      Whfldt = ‘S’
    64.      c                   EndIf
    65.      A*   
    66.      c                   IF        @Start = *Zeros
    67.      c                   Eval      @Start  = 1
    68.      c                   Eval      Cvstart = 1
    69.      c                   Eval      Cvend   = Whfldb
    70.      c                   Else
    71.      c                   Eval      Cvstart = Cvend + 1
    72.      c                   Eval      Cvend   = Cvend + Whfldb
    73.      c                   EndIf
    74.      A*   
    75.      c                   Eval      Cvfname  = Whfile
    76.      c                   Eval      Cvfield  = Whfldi
    77.      c                   Eval      Cvtype   = Whfldt
    78.      c                   Eval      Cvlength = Whfldb
    79.      c                   Eval      Cvdec    = Whfldp
    80.      c                   Eval      Cvformat = Whname
    81.      c                   WRITE     Cvrec
    82.      A*   
    83.      A*
    84.      c                   EndIf
    85.      c                   EndDo
    86.      c                   Close     Cvfile
    87.      A*   
    88.      A*   
    89.      c                   Eval      *Inlr = *ON

    1. /*****************************************************/
    2. /* cl name is cv1cl                                  */
    3. /* cl to build a temp flat file based on parms sent  */
    4. /* into the program                                  */
    5. /*****************************************************/
    6.  
    7.              PGM        PARM(&LENGTH)
    8.              DCL        VAR(&LENGTH) TYPE(*DEC) LEN(5 0)
    9.              DLTF       FILE(QTEMP/CVFLAT)
    10.              MONMSG     MSGID(CPF0000)
    11.              CRTPF      FILE(QTEMP/CVFLAT) RCDLEN(&LENGTH)
    12.  END:        ENDPGM

    1. H OPTION(*Srcstmt : *Nodebugio)
    2.      A**********************************************************************
    3.      A* program name IS cv2                                                *
    4.      A* this program will WRITE the program needed TO convert the file     *
    5.      A* TO CSV format                                                      *
    6.      A**********************************************************************
    7.      A*
    8.      fCvfileo   IF   e             Disk      Prefix(x_) Usropn
    9.      fCvpgm     uf a f  114        Disk
    10.      A*
    11.      d Rspec           Ds
    12.      d  Rrec                        112
    13.      A*
    14.      d @File           s             10
    15.      d @Length         s              5
    16.      d @Dem            s              1
    17.      d @Char5          s              5
    18.      d @Char2          s              2
    19.      d @Cvfield        s                   LIKE(x_Cvfield)
    20.      A*   
    21.      A* output the first d spec record
    22.      c                   Eval      %Subst(Rrec:18:1)   = ‘d’
    23.      c                   Eval      %Subst(Rrec:20:18)  = ‘Key             S ‘
    24.      c                   Eval      %Subst(Rrec:50:2)   = ‘10′
    25.      c                   Except    Drecadd
    26.      c                   Eval      %Subst(Rrec:19:93) = *Blanks
    27.      A* output the first d spec record
    28.      c                   Eval      %Subst(Rrec:20:18)  = ‘FlatDs          Ds’
    29.      c                   Except    Drecadd
    30.      c                   Eval      %Subst(Rrec:19:93) = *Blanks
    31.      A*   
    32.      A* open the file AND output the rest of the d spec
    33.      c                   Open      Cvfileo
    34.      c                   DoU       %Eof(Cvfileo)
    35.      c                   READ      Cvfileo
    36.      c                   IF        NOT %Eof(Cvfileo)
    37.      A*   
    38.      c                   IF        x_Cvtype = ‘A’
    39.      c                   Eval      %Subst(Rrec:51:13) = ‘1a   Inz(’‘"’‘)’
    40.      c                   Except    Drecadd
    41.      c                   Eval      %Subst(Rrec:19:93) = *Blanks
    42.      c                   EndIf
    43.      A* IF there IS a decimal then increase the length BY 2
    44.      A* this IS TO allow FOR the decimal IN the flat file
    45.      A* AND FOR the sign
    46.      c                   IF        x_Cvdec > *Zeros
    47.      c                   Eval      x_Cvlength = x_Cvlength + 2
    48.      c**                 Eval      %Subst(Rrec:56:9) = ‘Inz      ‘
    49.      c                   EndIf
    50.      A* the FIELD name IN the program can NOT be the same
    51.      A* AS the file name.
    52.      c                   IF        x_Cvfield = x_Cvformat
    53.      c                   Eval      x_Cvfield = ‘xx        ‘
    54.      c                   EndIf
    55.      A*   
    56.      c                   Move      x_Cvlength    @Char5
    57.      c                   Eval      %Subst(Rrec:19:18)  = x_Cvfield
    58.      c                   Eval      %Subst(Rrec:47:5)  = @Char5
    59.      c*                  Eval      %Subst(Rrec:52:1)  = x_Cvtype
    60.      c                   Eval      %Subst(Rrec:52:1)  = ‘a’
    61.       *   
    62.      c*                  IF        x_Cvtype = ‘S’
    63.      c*                  Move      x_Cvdec       @Char2
    64.      c*                  Eval      %Subst(Rrec:53:2)  = @Char2
    65.      c*                  Else
    66.      c                   Eval      %Subst(Rrec:53:2)  = ‘  ‘
    67.      c*                  EndIf
    68.      A*   
    69.      c                   Except    Drecadd
    70.      c                   Eval      %Subst(Rrec:19:93) = *Blanks
    71.      A*   
    72.      c                   IF        x_Cvtype = ‘A’
    73.      c                   Eval      %Subst(Rrec:51:13) = ‘1a   Inz(’‘"’‘)’
    74.      c                   Except    Drecadd
    75.      c                   Eval      %Subst(Rrec:19:93) = *Blanks
    76.      c                   EndIf
    77.      A* SET the delimiter
    78.      c                   Eval      %Subst(Rrec:51:13) = ‘1a   Inz(’‘ ‘‘)’
    79.      c                   Eval      %Subst(Rrec:61:1) = @Dem
    80.      c                   Except    Drecadd
    81.      c                   Eval      %Subst(Rrec:19:93) = *Blanks
    82.      A*   
    83.      c                   EndIf
    84.      c                   EndDo
    85.      A* close the file FOR the c spce
    86.      c                   Close     Cvfileo
    87.      A****************************************************************************
    88.      A*   
    89.      A* output the first c spec record
    90.      c                   Eval      %Subst(Rrec:18:1)   = ‘c’
    91.      c                   Eval      %Subst(Rrec:38:3)  = ‘DoU’
    92.      c                   Eval      %Subst(Rrec:48:16)  = ‘%Eof(          )’
    93.      c                   Eval      %Subst(Rrec:53:10)  = @File
    94.      A*   
    95.      c                   Except    Crecadd
    96.      c                   Eval      %Subst(Rrec:19:93) = *Blanks
    97.      A*   
    98.      c                   Eval      %Subst(Rrec:38:18)  = ‘                  ‘
    99.      c                   Eval      %Subst(Rrec:38:4)  = ‘Read’
    100.      c                   Eval      %Subst(Rrec:48:10)  = @File
    101.      A*   
    102.      c                   Except    Crecadd
    103.      c                   Eval      %Subst(Rrec:19:93) = *Blanks
    104.      A*   
    105.      c                   Eval      %Subst(Rrec:38:18)  = ‘                  ‘
    106.      c                   Eval      %Subst(Rrec:38:3)  = ‘If ‘
    107.      c                   Eval      %Subst(Rrec:48:20)  = ‘Not %Eof(          )’
    108.      c                   Eval      %Subst(Rrec:57:10)  = @File
    109.      A*   
    110.      c                   Except    Crecadd
    111.      c                   Eval      %Subst(Rrec:19:93) = *Blanks
    112.      A*   
    113.      A* open the file AND output the rest of the c specs
    114.      c                   Open      Cvfileo
    115.      c                   DoU       %Eof(Cvfileo)
    116.      c                   READ      Cvfileo
    117.      c                   IF        NOT %Eof(Cvfileo)
    118.      A* save FIELD name
    119.      c                   Eval      @Cvfield = x_Cvfield
    120.      A* the FIELD name IN the program can NOT be the same
    121.      A* AS the file name.
    122.      c                   IF        x_Cvfield = x_Cvfname
    123.      c                   Eval      x_Cvfield = ‘xx        ‘
    124.      c                   EndIf
    125.      A*   
    126.      A* SET up the KEY AND the chain TO CHECK FOR decimals
    127.      c                   IF        x_Cvdec > *Zeros
    128.      A*
    129.      c                   Eval      %Subst(Rrec:38:6)   = ‘Clear ‘
    130.      c                   Eval      %Subst(Rrec:62:10)  = ‘Key       ’
    131.      c                   Except    Crecadd
    132.      c                   Eval      %Subst(Rrec:38:6)   = ‘MoveL ‘
    133.      c                   Eval      %Subst(Rrec:48:1)   =
    134.      c                   Eval      %Subst(Rrec:49:10)  = %subst(x_Cvfield:1:10)
    135.      c                   Eval      %Subst(Rrec:59:1)   =
    136.      c                   Eval      %Subst(Rrec:62:10)  = ‘Key       ’
    137.      c                   Except    Crecadd
    138.      c                   Eval      %Subst(Rrec:19:93) = *Blanks
    139.      A*   
    140.      A* do the chain
    141.      c                   Eval      %Subst(Rrec:24:10)  = ‘Key       ’
    142.      c                   Eval      %Subst(Rrec:38:6)   = ‘Chain ‘
    143.      c                   Eval      %Subst(Rrec:48:7)   = ‘Cvfileo’
    144.      c                   Except    Crecadd
    145.      c                   Eval      %Subst(Rrec:19:93) = *Blanks
    146.      c                   Eval      %Subst(Rrec:38:6)   = ‘If    ‘
    147.      c                   Eval      %Subst(Rrec:48:17)  = ‘Z_Cvdec <> *Zeros’
    148.      c                   Except    Crecadd
    149.      c                   Eval      %Subst(Rrec:19:93) = *Blanks
    150.      c                   Eval      %Subst(Rrec:38:6)   = ‘Eval  ‘
    151.      c***************    Eval      %Subst(Rrec:48:2)   = ‘x_’
    152.      c                   Eval      %Subst(Rrec:48:10)  = x_Cvfield
    153.      c                   Eval      %Subst(Rrec:60:9)   = ‘= %Editc(’
    154.      c                   Eval      %Subst(Rrec:69:2)   = ‘x_’
    155.      c                   Eval      %Subst(Rrec:71:10)  = x_Cvfield
    156.      c                   Eval      %Subst(Rrec:81:5)   = ‘:’‘P’‘)’
    157.      c                   Except    Crecadd
    158.      c                   Eval      %Subst(Rrec:19:93) = *Blanks
    159.      c                   Eval      %Subst(Rrec:38:6)   = ‘Else  ‘
    160.      c                   Except    Crecadd
    161.      c                   Eval      %Subst(Rrec:19:93) = *Blanks
    162.      A*   
    163.      c                   EndIf
    164.      A*   
    165.      c                   Eval      %Subst(Rrec:38:6)   = ‘Move  ‘
    166.      c                   Eval      %Subst(Rrec:48:2)   = ‘x_’
    167.      c                   Eval      %Subst(Rrec:50:10)  = @Cvfield
    168.      c                   Eval      %Subst(Rrec:62:10)  = x_Cvfield
    169.      c                   Except    Crecadd
    170.      c                   Eval      %Subst(Rrec:19:93) = *Blanks
    171.      A*
    172.      c                   IF        x_Cvdec > *Zeros
    173.      A*
    174.      c                   Eval      %Subst(Rrec:38:6)   = ‘EndIf ‘
    175.      c                   Except    Crecadd
    176.      c                   Eval      %Subst(Rrec:19:93) = *Blanks
    177.      c                   EndIf
    178.      A*   
    179.      c                   EndIf
    180.      c                   EndDo
    181.      A* close the file
    182.      c                   Close     Cvfileo
    183.      A*   
    184.      c                   Eval      %Subst(Rrec:38:6)   = ‘Except’
    185.      c                   Eval      %Subst(Rrec:48:7)   = ‘Flatout’
    186.      c                   Except    Crecadd
    187.      c                   Eval      %Subst(Rrec:19:93) = *Blanks
    188.      A*   
    189.      c                   Eval      %Subst(Rrec:38:5)   = ‘EndIf’
    190.      c                   Except    Crecadd
    191.      c                   Eval      %Subst(Rrec:19:93) = *Blanks
    192.      A*   
    193.      c                   Eval      %Subst(Rrec:38:5)   = ‘EndDo’
    194.      c                   Except    Crecadd
    195.      c                   Eval      %Subst(Rrec:19:93) = *Blanks
    196.      A*   
    197.      c                   Eval      %Subst(Rrec:38:4)   = ‘Eval’
    198.      c                   Eval      %Subst(Rrec:48:11)  = ‘*Inlr = *On’
    199.      c                   Except    Crecadd
    200.      c                   Eval      %Subst(Rrec:19:93) = *Blanks
    201.      A****************************************************************************
    202.      A*   
    203.      A* output the o specs
    204.      c                   Eval      %Subst(Rrec:18:1)   = ‘o’
    205.      c                   Eval      %Subst(Rrec:19:10)  = ‘Cvflat    ‘
    206.      c                   Eval      %Subst(Rrec:29:4)  = ‘eadd’
    207.      c                   Eval      %Subst(Rrec:42:7)  = ‘Flatout’
    208.      c                   Except    Orecadd
    209.      c                   Eval      %Subst(Rrec:19:93) = *Blanks
    210.      A*   
    211.      c                   Eval      %Subst(Rrec:19:10)  = ‘          ‘
    212.      c                   Eval      %Subst(Rrec:29:4)  = ‘    ‘
    213.      c                   Eval      %Subst(Rrec:42:7)  = ‘Flatds ‘
    214.      c                   Except    Orecadd
    215.      c                   Eval      %Subst(Rrec:19:93) = *Blanks
    216.      A*   
    217.      c                   Eval      *Inlr = *ON
    218.      A*******************************************************
    219.      A* first time processing                               *
    220.      A*******************************************************
    221.      c     *Inzsr        Begsr
    222.  
    223.      c     *Entry        Plist
    224.      c                   Parm                    @File
    225.      c                   Parm                    @Length
    226.      c                   Parm                    @Dem
    227.      A*
    228.      A* output the h spec record
    229.      c                   Eval      %Subst(Rrec:18:1)  = ‘h’
    230.      c*                  Eval      %Subst(Rrec:20:29) =
    231.      c*                            ‘Option(*Srcstmt : *Nodebugio)’
    232.      c                   Except    Hrecadd
    233.      c                   Eval      %Subst(Rrec:19:93) = *Blanks
    234.      A*
    235.      A* open the file AND CHECK FOR formant name
    236.      c                   Open      Cvfileo
    237.      c                   READ      Cvfileo
    238.      c                   Close     Cvfileo
    239.      A* output the f spec record
    240.      c                   Eval      %Subst(Rrec:18:1)  = ‘f’
    241.      c                   Eval      %Subst(Rrec:19:10) = @File
    242.      c                   Eval      %Subst(Rrec:29:6) = ‘if   e’
    243.      c                   Eval      %Subst(Rrec:48:4) = ‘Disk’
    244.      c                   Eval      %Subst(Rrec:56:10) = ‘Prefix(x_)’
    245.      c                   Except    Frecadd
    246.      c                   Eval      %Subst(Rrec:19:93) = *Blanks
    247.      A*
    248.      c                   IF        x_Cvfname = x_Cvformat
    249.      c                   Eval      %Subst(Rrec:56:7)  = ‘Rename(’
    250.      c                   Eval      %Subst(Rrec:63:10) = x_Cvformat
    251.      c                   Eval      %Subst(Rrec:73:3)  = ‘:x)’
    252.      c                   Except    Frecadd
    253.      c                   Eval      %Subst(Rrec:19:93) = *Blanks
    254.      c                   EndIf
    255.      A*
    256.      A* output the f spec record
    257.      c                   Eval      %Subst(Rrec:18:1)  = ‘f’
    258.      c                   Eval      %Subst(Rrec:19:10) = ‘Cvflat    ‘
    259.      c                   Eval      %Subst(Rrec:29:6) = ‘uf a f’
    260.      c                   Eval      %Subst(Rrec:35:5) = @Length
    261.      c                   Eval      %Subst(Rrec:48:4) = ‘Disk’
    262.      c                   Except    Frecadd
    263.      c                   Eval      %Subst(Rrec:19:93) = *Blanks
    264.      A* output the last  f spec record
    265.      c                   Eval      %Subst(Rrec:18:1)  = ‘f’
    266.      c                   Eval      %Subst(Rrec:19:10) = ‘Cvfileo   ’
    267.      c                   Eval      %Subst(Rrec:29:6) = ‘if   e’
    268.      c                   Eval      %Subst(Rrec:46:6) = ‘k Disk’
    269.      c                   Eval      %Subst(Rrec:56:10) = ‘Prefix(z_)’
    270.      c                   Except    Frecadd
    271.      c                   Eval      %Subst(Rrec:19:93) = *Blanks
    272.      A*
    273.      A*
    274.      c     #Inzsr        Endsr
    275.      A*
    276.      oCvpgm     eadd         Hrecadd
    277.      o                       Rrec
    278.      A*
    279.      o          eadd         Frecadd
    280.      o                       Rrec
    281.      A*
    282.      o          eadd         Drecadd
    283.      o                       Rrec
    284.      A*
    285.      o          eadd         Crecadd
    286.      o                       Rrec
    287.      A*
    288.      o          eadd         Orecadd
    289.      o                       Rrec

    1. A* FILE NAME CVFILEO
    2.      A* CONVERSION WORK FILE
    3.      A*
    4.      A          R CVREC
    5.      A*
    6.      A            CVFNAME       10A         TEXT(‘FILE  NAME’)
    7.      A            CVFIELD       10A         TEXT(‘FIELD NAME’)
    8.      A            CVTYPE         1A         TEXT(‘FIELD TYPE’)
    9.      A            CVSTART        5S 0       TEXT(‘FIELD START’)
    10.      A            CVEND          5S 0       TEXT(‘FIELD END  ‘)
    11.      A            CVLENGTH       5S 0       TEXT(‘FIELD LENGTH’)
    12.      A            CVDEC          2S 0       TEXT(‘FIELD DEC   ’)
    13.      A            CVFORMAT      10A         TEXT(‘FIELD FORMAT’)
    14.      A*
    15.      A          K CVFIELD



    Possible Related Links
  • Tip: Converting String to Number in QUERY/400
  • PHP on iSeries
  • Post a Classified Ad

  • New Feature: Possibly Related Posts June 30, 2006

    There are times when you read about a topic and want to read more about it. Now you can on our website. Right below this post, you should be able to see Possible Related Posts and then a list of articles that may be related to the current article. You may not always find related articles, but it is a nice feature that you will hopefully find useful.



    Possible Related Links
  • MMUG Meeting on June 15th, 2006
  • iSeries Users Group Forums are now open
  • Open Source iSeries Toolkit

  • MCPressOnline iSeries Book Sale June 16, 2006

    MCPress is having a pretty good sale on their iSeries books.. lots of them are $10 or $15. These prices are good only until midnight, June 30, 2006 and while supply lasts. So head on there and grab a few. Just beware, some of the books may be pertaining to the older versions of the software. For example: the current IBM Websphere version is 6, but you may find the book for version 4 at sale price.

     

    http://www.mc-store.com/year-end-sale-10.html



    Possible Related Links
  • Current For Sale Items
  • For Sale
  • FOR SALE: IBM iSeries Model 825

  • Event Details posted for June 15, 2006 May 17, 2006

    Please check the event details on the events page.



    Possible Related Links
  • New Events Page
  • MMUG Meeting on June 15th, 2006
  • Post a Classified Ad

  • older posts »