Results 1 to 3 of 3
  1. #1
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    ... CASE IS (2000 sr 1)

    ... i take from this application a dat from a CICS application, my problem is:

    Make a "CASE IS" with this parameter, during the import:

    if in the column I (start i7) is present a number in this range 80 to 89 put in column M the value PROVA
    if in the column I (start i7) is present a number in this range 00 to 20 put in column M the value PROVA1
    if in the column I (start i7) is present a number in this range 21 to 40 put in column M the value PROVA2
    ..............
    if in the column I (start i7) is present a number 21 put in column M the value PROVA3
    .............
    if in the column I (start i7) is present a number in this range 60 to 79 put in column M the value PROVA4

    Dim cope As String
    Dim conta As Double
    Dim dato As String

    cope = "none"

    conta = 7

    While cope <> ""

    cope = Foglio3.Range("a" & Trim(Str(conta))).Value
    cope = Trim(cope)

    If cope <> "" Then

    Sess0.SCREEN.WAITFORSTRING "COPLIST", 6, 24, 7
    Sess0.SCREEN.putstring cope, 8, 35

    Sess0.SCREEN.SendKeys ("<ENTER>")
    Sess0.SCREEN.WAITFORSTRING "AFFIDATO", 7, 2, 8
    dato = Sess0.SCREEN.getstring(9, 20, 4) 'SPORT COMP
    Foglio3.Range("K" & Trim(Str(conta))).Value = dato
    '
    dato = Sess0.SCREEN.getstring(10, 20, 4) 'SPORT DETEN
    Foglio3.Range("L" & Trim(Str(conta))).Value = dato
    '
    Sess0.SCREEN.SendKeys ("<ENTER>")
    Sess0.SCREEN.WAITFORSTRING "EX SETTORE", 14, 2, 10

    dato = Sess0.SCREEN.getstring(14, 15, 2) 'EX SETT
    Foglio3.Range("I" & Trim(Str(conta))).Value = dato
    dato = Sess0.SCREEN.getstring(14, 37, 8) 'VAR IL
    Foglio3.Range("J" & Trim(Str(conta))).Value = dato

    Sess0.SCREEN.SendKeys ("<PF3>")
    Sess0.SCREEN.WAITFORSTRING "COPLIST", 6, 24, 7

    conta = conta + 1

    End If

    Wend

    MsgBox ("ELEABORAZIONE TERMINATA!")

    End Sub

  2. #2
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts

    Re: ... CASE IS (2000 sr 1)

    Are you looking for something like this??
    <pre> Select Case Foglio3.Range("I" & Trim(Str(conta))).Value
    Case 0 To 20
    Foglio3.Range("M" & Trim(Str(conta))).Value = "PROVA1"
    Case 21
    Foglio3.Range("M" & Trim(Str(conta))).Value = "PROVA3"
    Case 22 To 40
    Foglio3.Range("M" & Trim(Str(conta))).Value = "PROVA2"
    Case 60 To 79
    Foglio3.Range("M" & Trim(Str(conta))).Value = "PROVA4"
    Case 80 To 89
    Foglio3.Range("M" & Trim(Str(conta))).Value = "PROVA"
    End Select</pre>


    Steve

  3. #3
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: ... CASE IS (2000 sr 1)

    it work FINE!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    tks!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •