Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

File processing from PARMLIB member

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
kudamala

New User


Joined: 12 Sep 2008
Posts: 51
Location: Bangalore

PostPosted: Wed Apr 21, 2010 10:58 am    Post subject: File processing from PARMLIB member
Reply with quote

Hello

I have a requirements as below, can anybody please help.

1. My input is PARMLIB member. It contains the list of files.
for ex: PRD.PARMLIB(MEMBER1)
MEMBER1 has the following data:
PRD.xxxx.FTP.DATA
PRD.xxxx.FTP.DATA
PRD.xxxx.FTP.DATA

Here xxxx is 4 letter code change from file to file. We don't know how many files we receive in a day and what files we receive. MEMBER1 may have 1 file or 2 files or 20 files or n files .

My task is: I need to take MEMBER1 as input and check each file inside MEMBER1 for particular data validations. If even one record in file is not qualifying my data checks, then that file should not be copied to output and only valid files should be copied to output file. Output file should contain only valid list of files.

By default MEMBER1 will be with fixed length of 80.
Files inside member will be in VB format.

Validations for ex: first 2 chars in file should be 'EC' and 3 to 6 chars should be same as 4 letter code of file.

Can anybody give some idea how to do this task.
Back to top
View user's profile Send private message

Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7914
Location: Bellevue, IA

PostPosted: Wed Apr 21, 2010 4:24 pm    Post subject:
Reply with quote

Are you planning on writing a program to do this, or use a system utility? If the first, which programming language? If a utility, which one?

You have not provided anywhere near enough information yet for us to provide you any useful answers.
Back to top
View user's profile Send private message
kudamala

New User


Joined: 12 Sep 2008
Posts: 51
Location: Bangalore

PostPosted: Wed Apr 21, 2010 6:44 pm    Post subject: Reply to: File processing from PARMLIB member
Reply with quote

Hello

I use JCL, DB2 & COBOL

thank you
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7914
Location: Bellevue, IA

PostPosted: Wed Apr 21, 2010 6:51 pm    Post subject:
Reply with quote

Are you planning on doing this task in COBOL? Are the FTP data files fixed length or variable length? What is their LRECL (whether fixed or variable)?
Back to top
View user's profile Send private message
kudamala

New User


Joined: 12 Sep 2008
Posts: 51
Location: Bangalore

PostPosted: Thu Apr 22, 2010 2:52 pm    Post subject: Reply to: File processing from PARMLIB member
Reply with quote

Hello

Please see the answer for your questions:

Are you planning on doing this task in COBOL?
Yes, I need to use COBOL & JCL (it is batch process)

Are the FTP data files fixed length or variable length? What is their LRECL (whether fixed or variable)?

files are with Variable length and length is 597

Thanks
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4648
Location: Raleigh, NC, USA

PostPosted: Thu Apr 22, 2010 3:40 pm    Post subject: Reply to: File processing from PARMLIB member
Reply with quote

So, I guess that you will read the PARMLIB, select a dataset name, dynamically allocate that dataset, perform your check, then go back and repeat for the next dataset.
Back to top
View user's profile Send private message
kudamala

New User


Joined: 12 Sep 2008
Posts: 51
Location: Bangalore

PostPosted: Thu Apr 22, 2010 4:18 pm    Post subject: Reply to: File processing from PARMLIB member
Reply with quote

Yes Kevin

you are right. But my difficulty is, to read file one by one and check the data, if data inside is not matching the criteria, even for one record, then I need to ignore that file. If the data valid for all records then I need to process the file for further actions.

Regards
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7914
Location: Bellevue, IA

PostPosted: Thu Apr 22, 2010 5:32 pm    Post subject:
Reply with quote

It sounds pretty much like standard COBOL logic will work. If you have problems with the code once you've written it, let us know and we can make suggestions. However, this is a HELP forum, not a DO-YOUR-JOB-FOR-YOU forum so please do not ask for code unless you're willing to pay the professionals who respond on this forum their usual daily rate for work product (which typically is about 1000 U.S. dollars per day).
Back to top
View user's profile Send private message
kudamala

New User


Joined: 12 Sep 2008
Posts: 51
Location: Bangalore

PostPosted: Thu Apr 22, 2010 6:31 pm    Post subject: Reply to: File processing from PARMLIB member
Reply with quote

Hello TANSTAAFL

Thanks for your suggestion. But I asked for help only, not for code. I asked only to know the way how we can do that....if somebody can help, that would be helpful.I was looking for logical way....

Thanks to everybody who really helped me
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Thu Apr 22, 2010 6:38 pm    Post subject:
Reply with quote

I often wonder why people can be so precise
with their indignation
about perceived slander

yet can not be bothered to refer to other posters
with their name
and instead use
an abbreviation concerning the poster's outlook on life.

kudamala,

all you have said is that you can't do it.
you have not mentioned anything about what progress you have made
nor indicated precisely where you have problems.

what is anyone to think except that you want a solution? - for free.....
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1219
Location: Israel

PostPosted: Thu Apr 22, 2010 7:49 pm    Post subject: Re: Reply to: File processing from PARMLIB member
Reply with quote

OK, here is some real help. You can thank me later!

The main section of your program could look like this:
  1. Open PARMLIB file.
  2. Read one line (get one dataset name)
  3. if EOF, finish process (jump to point #7)
  4. not EOF: validate file (using "perform")
  5. If file is valid, add to output process (using "perform" too)
  6. Return to point #2 to read next line.
  7. finish process: close PARMLIB file
  8. End of program

This should be the main body of your program.
Now, you have 2 smaller sections to take care of:
The "validate file" and the "output process" sections.

The "validate file" section could look like this:
At this time, the only thing you have is a dataset name (received from PARMLIB file)
  1. Allocate the file.
  2. scan the file and set a valid/not-valid fla (using "perform" again)
  3. Free the file

The "output process" section will depend very much on how you plan to copy the files.
According to this sentence (I quote) "Output file should contain only valid list of files",
you just have to write the valid dataset name:
  1. write to output file

There is now one section left: the "scan the file" section:
  1. Open the file.
  2. set flag to "valid"
  3. Read one record.
  4. at end of file, jump to point #8
  5. Check record according to rules.
  6. if valid, proceed to next record (point #3)
  7. if not, set flag to "not-valid" and jump to point #8
  8. Close the file.
  9. return to caller (exit)


That may be the pseudo-code that describe your requirement.
You'll need now to translate that into cobol statements...
Good luck to you!
Back to top
View user's profile Send private message
kudamala

New User


Joined: 12 Sep 2008
Posts: 51
Location: Bangalore

PostPosted: Fri Apr 23, 2010 10:26 am    Post subject: Reply to: File processing from PARMLIB member
Reply with quote

Hi Marso
Thanks a lot, this is great help. As I work alone (one member project), some time I don't get correct flow. Once again thank you so much
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Fri Apr 23, 2010 7:24 pm    Post subject:
Reply with quote

Hello,

Quote:
some time I don't get correct flow
There is usually someone here you can "bounce ideas" off of. . . icon_smile.gif
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm
No new posts What is the command to check MODE of ... rohanthengal CLIST & REXX 6 Fri Nov 18, 2016 1:48 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts CICS Roll back partially - Need to re... dwijadas CICS 4 Wed Nov 16, 2016 4:30 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us