EZT Pgm for INPUT Validation



Unicenter CA-Easytrieve Plus Report Generator: CA's information retrieval and data management tool

EZT Pgm for INPUT Validation

Postby Ramsee » Wed Dec 04, 2013 6:02 pm

Hi All,

I have a typical requirement that my INPUT1 is a FILE which contains list of DSN names to verify the matching key.
INPUT2 is another file it will contain KEY.

Now i need to validate the first DSN present in the INPUT1 file and match with the INPUT2 Key, if KEY is found OUTPUT1 will write the DSN Name and KEY FOUND,Else DSN NAME KEY NOT FOUND like this i need to read all the DSN listed in INPUT1 file and need to match with the INPUT2 and write the OUTPUT1.

I dont know how to read the INPUT FILE Interenally.

Please suggest me how to read the DSN from INPUT1 internally.

Thanks,
Ramsee
Ramsee
 
Posts: 25
Joined: Wed Nov 20, 2013 6:08 pm
Has thanked: 0 time
Been thanked: 0 time

Re: EZT Pgm for INPUT Validation

Postby BillyBoyo » Wed Dec 04, 2013 8:05 pm

Are you trying to read the content of the DSN?
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: EZT Pgm for INPUT Validation

Postby Ramsee » Wed Dec 04, 2013 8:12 pm

Yes i am trying to read the content of the Listed DSN in the INPUT1 File.

Regards,
Ramsee
Ramsee
 
Posts: 25
Joined: Wed Nov 20, 2013 6:08 pm
Has thanked: 0 time
Been thanked: 0 time

Re: EZT Pgm for INPUT Validation

Postby dick scherrer » Wed Dec 04, 2013 8:14 pm

Hello,

Suggest you post a bit of sample input from both files and show what you want as output from this sample data when your process is run.

Cover anything the "real" data may contain.

Show the "rules" for processing the data.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: EZT Pgm for INPUT Validation

Postby Akatsukami » Wed Dec 04, 2013 8:43 pm

Ramsee wrote:Yes i am trying to read the content of the Listed DSN in the INPUT1 File.

Then you will surely want to dynamically allocate those data sets. If Easytrieve does not have a native capacity to do this, I expect that you can invoke BPXWDYN.
"You have sat too long for any good you have been doing lately ... Depart, I say; and let us have done with you. In the name of God, go!" -- what I say to a junior programmer at least once a day
User avatar
Akatsukami
Global moderator
 
Posts: 1058
Joined: Sat Oct 16, 2010 2:31 am
Location: Bloomington, IL
Has thanked: 6 times
Been thanked: 51 times

Re: EZT Pgm for INPUT Validation

Postby Ramsee » Wed Dec 04, 2013 8:47 pm

Please find the below requirement for the same

INPUT1 : List of DSN in the File
USER.TEST.DSN1
USER.TEST.DSN2
USER.TEST.DSN3
USER.TEST.DSN4
USER.TEST.DSN5
USER.TEST.DSN6
USER.TEST.DSN7
USER.TEST.DSN8
USER.TEST.DSN9


INPUT2 : KEy to be verified from the INPUT1 list of DSN
123456789

KEY
Data in DSN1..DSN9 is present in the POSITION 40.
------+----1----+----2----+----3----+----4----+----5---
ASDASDASDASDASDSADSADASDSADA 123456789  --> Date in USER.TEST.DSN1
ASDASDASDASDASDSADSADASDSADA 123456781  --> Date in USER.TEST.DSN2
ASDASDASDASDASDSADSADASDSADA 123456783  --> Date in USER.TEST.DSN3
ASDASDASDASDASDSADSADASDSADA 123456789  --> Date in USER.TEST.DSN4
ASDASDASDASDASDSADSADASDSADA 123456781  --> Date in USER.TEST.DSN5
ASDASDASDASDASDSADSADASDSADA 123456789  --> Date in USER.TEST.DSN6
ASDASDASDASDASDSADSADASDSADA 123456789  --> Date in USER.TEST.DSN7
ASDASDASDASDASDSADSADASDSADA 123456789  --> Date in USER.TEST.DSN8
ASDASDASDASDASDSADSADASDSADA 123456789  --> Date in USER.TEST.DSN9

OUTPUT1
USER.TEST.DSN1    KEY FOUND
USER.TEST.DSN2    KEY NOT FOUND
USER.TEST.DSN3    KEY NOT FOUND
USER.TEST.DSN4    KEY FOUND
USER.TEST.DSN5    KEY NOT FOUND
USER.TEST.DSN6    KEY FOUND
USER.TEST.DSN7    KEY FOUND
USER.TEST.DSN8    KEY FOUND
USER.TEST.DSN9    KEY FOUND


Please let me know in case of any further information is required.

Regards,
Seetharaman
Ramsee
 
Posts: 25
Joined: Wed Nov 20, 2013 6:08 pm
Has thanked: 0 time
Been thanked: 0 time

Re: EZT Pgm for INPUT Validation

Postby dick scherrer » Thu Dec 05, 2013 12:47 am

Hello,

One way to get what you want is to read the "key" file and get the search value. Then read the DSN file and generate SORT steps to read each file looking for the "key". When the key is found generate the "found" message. When not found, generate the not found message.

Write the found/not found info to a file that each step MODs onto.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times


Return to CA-Easytrieve

 


  • Related topics
    Replies
    Views
    Last post