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
 

 

scanning a field in multiple recrds before writing to output

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
srujanasangu

New User


Joined: 12 Apr 2010
Posts: 2
Location: India

PostPosted: Fri Jun 10, 2011 12:21 pm    Post subject: scanning a field in multiple recrds before writing to output
Reply with quote

I have an input file as below,
input file:
OPCDAILY1 1106061655 C
OPCDAILY2 1106081027 S
OPCDAILY3 1106081027 C
OPCDAILY4 1106081027 E
OPCDAILY5 1106081027 C
OPCDAILY6 1106081027 C

output file should be:
application OPCDAILY4 ended in error

Input file is FB, reclen 80. 3 fields are from pos 1-16, 17-28, 29.

Even if one record has E in pos 29, output should say 'application ended in error' irrespective of other record's pos 29.
if any of the record has E at pos 29, the output file should have 'application xxx(pos 1-16) ended in error'.
if any of the record has S at pos 29, the output file should have 'jobs are started'
only if all the records has C at pos 29, the output file should have 'jobs are complete'.

please help me out in doing this.
Back to top
View user's profile Send private message

Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Fri Jun 10, 2011 9:21 pm    Post subject:
Reply with quote

What output do you want for the following input records:

Input 1
OPCDAILY1 1106061655 S
OPCDAILY2 1106081027 E
OPCDAILY3 1106081027 S
OPCDAILY4 1106081027 E

Output 1 ?

Input 2
OPCDAILY1 1106061655 S
OPCDAILY2 1106081027 S
OPCDAILY3 1106081027 S

Output 2?
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 -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts find RACF group for access to spooled... jzhardy JCL & VSAM 1 Mon May 08, 2017 11:46 am
No new posts Unable to create multiple files using... mbattu COBOL Programming 3 Fri May 05, 2017 5:35 pm
No new posts READ A PACKED "NEGATIVE" FI... jdesouza CA Products 3 Tue May 02, 2017 11:43 pm
No new posts Alter &DATENS field in HEADER1 Angad DFSORT/ICETOOL 4 Mon Apr 24, 2017 11:49 am
This topic is locked: you cannot edit posts or make replies. SDSF multiple spool datasets extracte... PJAlarcon CLIST & REXX 1 Fri Apr 21, 2017 10:50 pm


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