TechTalk: RPG 1P Indicator Alternative

RPG
Typography
  • Smaller Small Medium Big Bigger
  • Default Helvetica Segoe Georgia Times

I have found what I feel is a simple but better alternative to the first page indicator 1P. The problem with using 1P is that program-supplied information will not show up on the first page of the report. The solution I have used in the past is what seems to be the common method. (See 5.)

I have found what I feel is a simple but better alternative to the first page indicator 1P. The problem with using 1P is that program-supplied information will not show up on the first page of the report. The solution I have used in the past is what seems to be the common method. (See Figure 5.)

This method works fine but requires an indicator and the additional SETOF at the beginning of each detail cycle.

What works better is a slight modification of the above. Instead of the SETON 81, use SETON OF and use only the overflow indicator on the output specs. (See 6.)

What works better is a slight modification of the above. Instead of the SETON 81, use SETON OF and use only the overflow indicator on the output specs. (See Figure 6.)

This works, since H and D output is done at the same time, causing the headings to be the first thing printed on the first detail cycle. This method requires no additional indicator and saves the SETOF that would occur on each cycle, a small benefit of this method but one which requires no effort.

This method also works well if your report is done with exception output. The heading will be printed on the first detail cycle, and by using a FETCH on the Exception line, overflow will be taken care of. (See 7.)

This method also works well if your report is done with exception output. The heading will be printed on the first detail cycle, and by using a FETCH on the Exception line, overflow will be taken care of. (See Figure 7.)

There may be some types of reporting that are too complicated for this method. But it seems to work fine for most reporting requirements. I can't remember the last time that I used 1P or SETON/SETOF method.

Mike Sopotnick Leesburg, Florida


TechTalk: RPG 1P Indicator Alternative

Figure 5 Conventional first-page processing

 Figure 5: Conventional First-Page Processing 6...1....+....2....+....3....+....4....+....5....+....6....+....7 C SETOF 81 C HHMMSS IFEQ *ZERO C TIME HHMMSS 60 C . C first cycle processing C . C SETON 81 C END OREPORT H 106 81 O OR OF O Heading output 6...1....+....2....+....3....+....4....+....5....+....6....+....7 
TechTalk: RPG 1P Indicator Alternative

Figure 6 Alternative first-page processing

 Figure 6: Alternative to Conventional First-Page Processing 6...1....+....2....+....3....+....4....+....5....+....6....+....7 C HHMMSS IFEQ *ZERO C TIME HHMMSS 60 C . C first cycle processing C . C SETON OF C END OREPORT H 106 OF O Heading output O DF 1 01 O Detail output 6...1....+....2....+....3....+....4....+....5....+....6....+....7 
TechTalk: RPG 1P Indicator Alternative

Figure 7 Using alternative with exception output

 Figure 7: Using Alternative First-Page Method with Exception Output 6...1....+....2....+....3....+....4....+....5....+....6....+....7 OREPORT EF 1 DETAIL O Detail exception output 
BLOG COMMENTS POWERED BY DISQUS

LATEST COMMENTS

Support MC Press Online

$

Book Reviews

Resource Center

  •  

  • LANSA Business users want new applications now. Market and regulatory pressures require faster application updates and delivery into production. Your IBM i developers may be approaching retirement, and you see no sure way to fill their positions with experienced developers. In addition, you may be caught between maintaining your existing applications and the uncertainty of moving to something new.

  • The MC Resource Centers bring you the widest selection of white papers, trial software, and on-demand webcasts for you to choose from. >> Review the list of White Papers, Trial Software or On-Demand Webcast at the MC Press Resource Center. >> Add the items to yru Cart and complet he checkout process and submit

  • SB Profound WC 5536Join us for this hour-long webcast that will explore:

  • Fortra IT managers hoping to find new IBM i talent are discovering that the pool of experienced RPG programmers and operators or administrators with intimate knowledge of the operating system and the applications that run on it is small. This begs the question: How will you manage the platform that supports such a big part of your business? This guide offers strategies and software suggestions to help you plan IT staffing and resources and smooth the transition after your AS/400 talent retires. Read on to learn: