Results 1 to 5 of 5

CICS Validation

This is a discussion on CICS Validation within the MainFrame forums, part of the Software Development category; I have cics screen on which I have defined a variable as account number pic X(10) . and in my program I need to accept them into Pic 9(10). I ...

  1. #1
    Junior Member
    Join Date
    Apr 2008
    Answers
    1

    CICS Validation

    I have cics screen on which I have defined a variable as account number pic X(10) . and in my program I need to accept them into Pic 9(10).
    I need to validate the screen and in the program
    for below conditions.
    If the user enters A1234 then the program should not accept this.
    If the user enters 1234 and a space and 5 then also it should not accept.
    if the user enters 3 or 4 spaces and then enters 1234 and then spaces then the program should treat this as valid entry and then continue executing the program.

    How do you validate all the conditions in single para.


  2. #2
    Junior Member
    Join Date
    May 2008
    Answers
    2

    Re: CICS Validation

    from ur query i feel that u wanna to accept only numners.

    give NUM option for that particular input field in CICS Map.


  3. #3
    Junior Member
    Join Date
    Apr 2008
    Answers
    5

    Re: CICS Validation

    hey i feel what uma had written will only solve the problem partially...what will happen in 2nd and 3rd case...correct me if i am wrong....


  4. #4
    Junior Member
    Join Date
    May 2008
    Answers
    2

    Re: CICS Validation

    Supriya,
    The normal technique is as follows:
    1. Accept the input as VARIABLE X(10) and then redefine it to a 9(10).
    2. Define the edit criteria in your program for the conditions you have specified. If VARIABLE IS NUMERIC etc etc.
    3. To support your 3rd case, you can also use LEFT JUSTIFIED or scan for spaces.

    In any case, the best way is to use X(10). You can use 9(10) from the start, however, you have to take care of preventing S0C7s.

    Good luck and let us know which technique you followed.

    Thanks,
    -PK

    Quote Originally Posted by supriya_saraswat View Post
    I have cics screen on which I have defined a variable as account number pic X(10) . and in my program I need to accept them into Pic 9(10).
    I need to validate the screen and in the program
    for below conditions.
    If the user enters A1234 then the program should not accept this.
    If the user enters 1234 and a space and 5 then also it should not accept.
    if the user enters 3 or 4 spaces and then enters 1234 and then spaces then the program should treat this as valid entry and then continue executing the program.

    How do you validate all the conditions in single para.



  5. #5
    Junior Member
    Join Date
    Jul 2008
    Answers
    2

    Re: CICS Validation

    u can perform numerical test in the para validating the input, the condition failing on which u can inspect the input for leading spaces and still pass the condition.. unstring the spaces and the field seperately and move the field into 9() item.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact

SEO by vBSEO 3.6.0 ©2011, Crawlability, Inc.